Capstone Project - The Battle of Neighborhoods

Introduction

New York City, often called simply New York and abbreviated as NYC, is the most populous city in the United States. With an estimated 2019 population of 8,336,817 distributed over about 302.6 square miles (784 km2), New York is also the most densely populated major city in the United States.Located at the southern tip of the U.S. state of New York, the city is the center of the New York metropolitan area, the largest metropolitan area in the world by urban landmass. With almost 20 million people in its metropolitan statistical area and approximately 23 million in its combined statistical area, it is one of the world's most populous megacities. New York City has been described as the cultural, financial, and media capital of the world, significantly influencing commerce, entertainment, research, technology, education, politics, tourism, art, fashion, and sports. Home to the headquarters of the United Nations, New York is an important center for international diplomacy.

New York City is composed of five boroughs, each of which is a county of the State of New York. The five boroughs — Brooklyn, Queens, Manhattan, the Bronx, and Staten Island — were consolidated into a single city in 1898. The city and its metropolitan area constitute the premier gateway for legal immigration to the United States. As many as 800 languages are spoken in New York, making it the most linguistically diverse city in the world. New York is home to more than 3.2 million residents born outside the United States, the largest foreign-born population of any city in the world as of 2016. Throughout its history, New York City has been a major point of entry for immigrants; the term "melting pot" was coined to describe densely populated immigrant neighborhoods on the Lower East Side.

New York City has the largest population of Italian Americans in the USA as well as North America. New York City is home to the third largest Italian population outside of Italy, behind São Paulo, Brazil and Buenos Aires, Argentina, respectively. Over 1.3 million Italians and Italian-Americans live in the greater New York City metro area, with about 800,000 living within one of the five New York City boroughs. Some of the Italian-American neighborhoods in New York City are -

  1. Arthur Avenue (the Bronx's Little Italy)
  2. Bensonhurst, Brooklyn (Brooklyn's Little Italy)
  3. Mulberry Street, Little Italy, Manhattan
  4. Howard Beach, Queens
  5. Staten Island – The borough has the highest proportion of Italian Americans of any county in the United States. About 200,000 residents claim Italian heritage (55%).

As part of this project, using the Foursquare APIs, we will analyze the Italian restaurants in the 5 boroughs and its various neighborhoods, rank the borough with the highest rated Italian restaurants and also rank the neighborhoods which have the highest number of Italian restaurants. We will also visualize the neighborhoods in a choropleth map.

Data

For this project we will need the following data :

New York City data that contains list Boroughs, Neighborhoods along with their latitude and longitude. Data source : https://cocl.us/new_york_dataset Description : This data set contains the required information. And we will use this dataset to explore various neighborhoods of New York City.

Italian resturants in each neighborhood of new york city. Data source : Fousquare APIs Description : By using the Foursquare APIs we will get all the venues in each neighborhood. We can filter these venues to get only Italian restaurants.

GeoSpace data Data source : https://data.cityofnewyork.us/City-Government/Borough-Boundaries/tqmj-j8zm Description : By using this Geospace data we will get the New York Borough boundaries that will help us visualize the top rated Italian restaurants in a Choropleth map.

Data Analysis Approach

  1. Get the New York city data from https://cocl.us/new_york_dataset
  2. Using the FourSquare API we will find all venues for each neighborhood
  3. Filter out all venues that are Italian Restaurants
  4. Find the Rating , Tips and Likes count for each Italian Restaurants using FourSquare API
  5. Sort the Restaurants by the user Ratings
  6. Visualize the Ranking of neighborhoods using Folium library(Python)

Questions that can be asked using the above mentioned datasets

What is/are the best Borough(s) and Neighborhood(s) in New York City for Italian Cuisine? Which neighborhoods have potential for opening Italian Restaurants? What are the best neighborhoods to stay in, if I prefer Italian Cuisine?

Analysis We will import the required libraries for Python - pandas and numpy for handling data. request module for using FourSquare API. geopy to get co-ordinates of City of New York. folium to visualize the results on a map

Import necessary libraries

In [7]:
import numpy as np # library to handle data in a vectorized manner

import pandas as pd # library for data analsysis
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)

import json # library to handle JSON files

!conda install -c conda-forge geopy --yes # uncomment this line if you haven't completed the Foursquare API lab
from geopy.geocoders import Nominatim # convert an address into latitude and longitude values

import requests # library to handle requests
from pandas.io.json import json_normalize # tranform JSON file into a pandas dataframe

# Matplotlib and associated plotting modules
import matplotlib.cm as cm
import matplotlib.colors as colors

# import k-means from clustering stage
from sklearn.cluster import KMeans

!conda install -c conda-forge folium=0.5.0 --yes # uncomment this line if you haven't completed the Foursquare API lab
import folium # map rendering library

print('Libraries imported.')
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/jupyterlab/conda/envs/python

  added / updated specs:
    - geopy


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    geographiclib-1.50         |             py_0          34 KB  conda-forge
    geopy-2.0.0                |     pyh9f0ad1d_0          63 KB  conda-forge
    ------------------------------------------------------------
                                           Total:          97 KB

The following NEW packages will be INSTALLED:

  geographiclib      conda-forge/noarch::geographiclib-1.50-py_0
  geopy              conda-forge/noarch::geopy-2.0.0-pyh9f0ad1d_0



Downloading and Extracting Packages
geopy-2.0.0          | 63 KB     | ##################################### | 100% 
geographiclib-1.50   | 34 KB     | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/jupyterlab/conda/envs/python

  added / updated specs:
    - folium=0.5.0


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    altair-4.1.0               |             py_1         614 KB  conda-forge
    branca-0.4.1               |             py_0          26 KB  conda-forge
    brotlipy-0.7.0             |py36h8c4c3a4_1000         346 KB  conda-forge
    chardet-3.0.4              |py36h9f0ad1d_1006         188 KB  conda-forge
    cryptography-2.9.2         |   py36h45558ae_0         613 KB  conda-forge
    folium-0.5.0               |             py_0          45 KB  conda-forge
    pandas-1.0.5               |   py36h830a2c2_0        10.1 MB  conda-forge
    pysocks-1.7.1              |   py36h9f0ad1d_1          27 KB  conda-forge
    toolz-0.10.0               |             py_0          46 KB  conda-forge
    vincent-0.4.4              |             py_1          28 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        12.0 MB

The following NEW packages will be INSTALLED:

  altair             conda-forge/noarch::altair-4.1.0-py_1
  attrs              conda-forge/noarch::attrs-19.3.0-py_0
  branca             conda-forge/noarch::branca-0.4.1-py_0
  brotlipy           conda-forge/linux-64::brotlipy-0.7.0-py36h8c4c3a4_1000
  chardet            conda-forge/linux-64::chardet-3.0.4-py36h9f0ad1d_1006
  cryptography       conda-forge/linux-64::cryptography-2.9.2-py36h45558ae_0
  entrypoints        conda-forge/linux-64::entrypoints-0.3-py36h9f0ad1d_1001
  folium             conda-forge/noarch::folium-0.5.0-py_0
  idna               conda-forge/noarch::idna-2.10-pyh9f0ad1d_0
  importlib_metadata conda-forge/noarch::importlib_metadata-1.7.0-0
  jinja2             conda-forge/noarch::jinja2-2.11.2-pyh9f0ad1d_0
  jsonschema         conda-forge/linux-64::jsonschema-3.2.0-py36h9f0ad1d_1
  markupsafe         conda-forge/linux-64::markupsafe-1.1.1-py36h8c4c3a4_1
  pandas             conda-forge/linux-64::pandas-1.0.5-py36h830a2c2_0
  pyopenssl          conda-forge/noarch::pyopenssl-19.1.0-py_1
  pyrsistent         conda-forge/linux-64::pyrsistent-0.16.0-py36h8c4c3a4_0
  pysocks            conda-forge/linux-64::pysocks-1.7.1-py36h9f0ad1d_1
  pytz               conda-forge/noarch::pytz-2020.1-pyh9f0ad1d_0
  requests           conda-forge/noarch::requests-2.24.0-pyh9f0ad1d_0
  toolz              conda-forge/noarch::toolz-0.10.0-py_0
  urllib3            conda-forge/noarch::urllib3-1.25.9-py_0
  vincent            conda-forge/noarch::vincent-0.4.4-py_1



Downloading and Extracting Packages
pysocks-1.7.1        | 27 KB     | ##################################### | 100% 
toolz-0.10.0         | 46 KB     | ##################################### | 100% 
chardet-3.0.4        | 188 KB    | ##################################### | 100% 
folium-0.5.0         | 45 KB     | ##################################### | 100% 
branca-0.4.1         | 26 KB     | ##################################### | 100% 
cryptography-2.9.2   | 613 KB    | ##################################### | 100% 
brotlipy-0.7.0       | 346 KB    | ##################################### | 100% 
altair-4.1.0         | 614 KB    | ##################################### | 100% 
pandas-1.0.5         | 10.1 MB   | ##################################### | 100% 
vincent-0.4.4        | 28 KB     | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Libraries imported.

Define Foursquare Credentials and Version

In [81]:
CLIENT_ID = 'GQG2AO3KQUJVUJCZWIGFZJVBLEVSMI1CDEEEL5BECXCJ0JHA' # your Foursquare ID
CLIENT_SECRET = 'GUJCP5K44TITQ4XTPYBVXF1QEW52NHVZVITATJJCWQZSB54C' # your Foursquare Secret
VERSION = '20180605' # Foursquare API version

Define a function to get the latitude and longitude of a given location using geopy

In [9]:
def geo_location(address):
    # get geo location of address
    geolocator = Nominatim(user_agent="ny_explorer")
    location = geolocator.geocode(address)
    latitude = location.latitude
    longitude = location.longitude
    return latitude,longitude

Define a function to get the list of Venues using the Foursquare API

In [10]:
def get_venues(lat,lng):
    
    #set variables
    radius=1000
    LIMIT=100
        
    #url to fetch data from foursquare api
    url = 'https://api.foursquare.com/v2/venues/explore?&client_id={}&client_secret={}&v={}&ll={},{}&radius={}&limit={}'.format(
            CLIENT_ID, 
            CLIENT_SECRET, 
            VERSION, 
            lat, 
            lng, 
            radius, 
            LIMIT)
    
    # get all the data
    results = requests.get(url).json()
    venue_data=results["response"]['groups'][0]['items']
    venue_details=[]
    for row in venue_data:
        try:
            venue_id=row['venue']['id']
            venue_name=row['venue']['name']
            venue_category=row['venue']['categories'][0]['name']
            venue_details.append([venue_id,venue_name,venue_category])
        except KeyError:
            pass
        
    column_names=['ID','Name','Category']
    df = pd.DataFrame(venue_details,columns=column_names)
    return df

Define a function to get the Venue details - Rating, Tips, Likes - for ranking

In [11]:
def get_venue_details(venue_id):
        
    #url to fetch data from foursquare api
    url = 'https://api.foursquare.com/v2/venues/{}?&client_id={}&client_secret={}&v={}'.format(
            venue_id,
            CLIENT_ID, 
            CLIENT_SECRET, 
            VERSION)
    
    # get all the data
    results = requests.get(url).json()
    venue_data=results['response']['venue']
    venue_details=[]
    try:
        venue_id=venue_data['id']
        venue_name=venue_data['name']
        venue_likes=venue_data['likes']['count']
        venue_rating=venue_data['rating']
        venue_tips=venue_data['tips']['count']
        venue_details.append([venue_id,venue_name,venue_likes,venue_rating,venue_tips])
    except KeyError:
        pass
        
    column_names=['ID','Name','Likes','Rating','Tips']
    df = pd.DataFrame(venue_details,columns=column_names)
    return df

Define a function to get NYC data - Boroughs and Neighborhoods and their Latitude, Longitude

In [12]:
def get_new_york_data():
    url='https://cocl.us/new_york_dataset'
    resp=requests.get(url).json()
    # all data is present in features label
    features=resp['features']
    
    # define the dataframe columns
    column_names = ['Borough', 'Neighborhood', 'Latitude', 'Longitude'] 
    # instantiate the dataframe
    new_york_data = pd.DataFrame(columns=column_names)
    
    for data in features:
        borough = data['properties']['borough'] 
        neighborhood_name = data['properties']['name']
        
        neighborhood_latlon = data['geometry']['coordinates']
        neighborhood_lat = neighborhood_latlon[1]
        neighborhood_lon = neighborhood_latlon[0]
    
        new_york_data = new_york_data.append({'Borough': borough,
                                          'Neighborhood': neighborhood_name,
                                          'Latitude': neighborhood_lat,
                                          'Longitude': neighborhood_lon}, ignore_index=True)
    
    return new_york_data

Get New York City data

In [13]:
new_york_data=get_new_york_data()
In [14]:
new_york_data.head()
Out[14]:
Borough Neighborhood Latitude Longitude
0 Bronx Wakefield 40.894705 -73.847201
1 Bronx Co-op City 40.874294 -73.829939
2 Bronx Eastchester 40.887556 -73.827806
3 Bronx Fieldston 40.895437 -73.905643
4 Bronx Riverdale 40.890834 -73.912585
In [15]:
new_york_data.shape
Out[15]:
(306, 4)
In [16]:
# Matplotlib and associated plotting modules
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors as colors
%matplotlib inline

Plot the number of Neighborhoods in each of the 5 Boroughs

In [17]:
import matplotlib.pyplot as plt
plt.figure(figsize=(9,5), dpi = 100)
# title
plt.title('Number of Neighborhoods for each Borough in New York City')
#On x-axis
plt.xlabel('Borough', fontsize = 15)
#On y-axis
plt.ylabel('No.of Neighborhoods', fontsize=15)
#giving a bar plot
new_york_data.groupby('Borough')['Neighborhood'].count().plot(kind='bar')
#legend
plt.legend()
#displays the plot
plt.show()
In [18]:
new_york_data_Bronx = new_york_data[new_york_data['Borough'] == 'Bronx']
new_york_data_Brooklyn = new_york_data[new_york_data['Borough'] == 'Brooklyn']
new_york_data_Manhattan = new_york_data[new_york_data['Borough'] == 'Manhattan']
new_york_data_Queens = new_york_data[new_york_data['Borough'] == 'Queens']
new_york_data_Staten_Island = new_york_data[new_york_data['Borough'] == 'Staten Island']
In [19]:
new_york_data_Bronx.shape
Out[19]:
(52, 4)
In [20]:
new_york_data_Brooklyn.shape
Out[20]:
(70, 4)
In [21]:
new_york_data_Manhattan.shape
Out[21]:
(40, 4)
In [22]:
new_york_data_Queens.shape
Out[22]:
(81, 4)
In [23]:
new_york_data_Staten_Island.shape
Out[23]:
(63, 4)
In [26]:
# prepare neighborhood list that contains Italian restaurants in Bronx
column_names=['Borough', 'Neighborhood', 'ID','Name']
italian_rest_Bronx=pd.DataFrame(columns=column_names)
count=1
for row in new_york_data_Bronx.values.tolist():
    Borough, Neighborhood, Latitude, Longitude=row
    venues = get_venues(Latitude,Longitude)
    italian_restaurants=venues[venues['Category']=='Italian Restaurant']   
    print('(',count,'/',len(new_york_data_Bronx),')','Italian Restaurants in '+Neighborhood+', '+Borough+':'+str(len(italian_restaurants)))
    for restaurant_detail in italian_restaurants.values.tolist():
        id, name , category=restaurant_detail
        italian_rest_Bronx = italian_rest_Bronx.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name
                                               }, ignore_index=True)
    count+=1
( 1 / 52 ) Italian Restaurants in Wakefield, Bronx:0
( 2 / 52 ) Italian Restaurants in Co-op City, Bronx:0
( 3 / 52 ) Italian Restaurants in Eastchester, Bronx:0
( 4 / 52 ) Italian Restaurants in Fieldston, Bronx:0
( 5 / 52 ) Italian Restaurants in Riverdale, Bronx:1
( 6 / 52 ) Italian Restaurants in Kingsbridge, Bronx:1
( 7 / 52 ) Italian Restaurants in Woodlawn, Bronx:2
( 8 / 52 ) Italian Restaurants in Norwood, Bronx:0
( 9 / 52 ) Italian Restaurants in Williamsbridge, Bronx:0
( 10 / 52 ) Italian Restaurants in Baychester, Bronx:2
( 11 / 52 ) Italian Restaurants in Pelham Parkway, Bronx:3
( 12 / 52 ) Italian Restaurants in City Island, Bronx:3
( 13 / 52 ) Italian Restaurants in Bedford Park, Bronx:1
( 14 / 52 ) Italian Restaurants in University Heights, Bronx:0
( 15 / 52 ) Italian Restaurants in Morris Heights, Bronx:0
( 16 / 52 ) Italian Restaurants in Fordham, Bronx:10
( 17 / 52 ) Italian Restaurants in East Tremont, Bronx:0
( 18 / 52 ) Italian Restaurants in West Farms, Bronx:0
( 19 / 52 ) Italian Restaurants in High  Bridge, Bronx:0
( 20 / 52 ) Italian Restaurants in Melrose, Bronx:2
( 21 / 52 ) Italian Restaurants in Mott Haven, Bronx:1
( 22 / 52 ) Italian Restaurants in Port Morris, Bronx:0
( 23 / 52 ) Italian Restaurants in Longwood, Bronx:0
( 24 / 52 ) Italian Restaurants in Hunts Point, Bronx:0
( 25 / 52 ) Italian Restaurants in Morrisania, Bronx:1
( 26 / 52 ) Italian Restaurants in Soundview, Bronx:0
( 27 / 52 ) Italian Restaurants in Clason Point, Bronx:0
( 28 / 52 ) Italian Restaurants in Throgs Neck, Bronx:6
( 29 / 52 ) Italian Restaurants in Country Club, Bronx:4
( 30 / 52 ) Italian Restaurants in Parkchester, Bronx:0
( 31 / 52 ) Italian Restaurants in Westchester Square, Bronx:2
( 32 / 52 ) Italian Restaurants in Van Nest, Bronx:2
( 33 / 52 ) Italian Restaurants in Morris Park, Bronx:5
( 34 / 52 ) Italian Restaurants in Belmont, Bronx:15
( 35 / 52 ) Italian Restaurants in Spuyten Duyvil, Bronx:1
( 36 / 52 ) Italian Restaurants in North Riverdale, Bronx:2
( 37 / 52 ) Italian Restaurants in Pelham Bay, Bronx:4
( 38 / 52 ) Italian Restaurants in Schuylerville, Bronx:3
( 39 / 52 ) Italian Restaurants in Edgewater Park, Bronx:6
( 40 / 52 ) Italian Restaurants in Castle Hill, Bronx:0
( 41 / 52 ) Italian Restaurants in Olinville, Bronx:0
( 42 / 52 ) Italian Restaurants in Pelham Gardens, Bronx:1
( 43 / 52 ) Italian Restaurants in Concourse, Bronx:1
( 44 / 52 ) Italian Restaurants in Unionport, Bronx:0
( 45 / 52 ) Italian Restaurants in Edenwald, Bronx:0
( 46 / 52 ) Italian Restaurants in Claremont Village, Bronx:0
( 47 / 52 ) Italian Restaurants in Concourse Village, Bronx:2
( 48 / 52 ) Italian Restaurants in Mount Eden, Bronx:0
( 49 / 52 ) Italian Restaurants in Mount Hope, Bronx:0
( 50 / 52 ) Italian Restaurants in Bronxdale, Bronx:5
( 51 / 52 ) Italian Restaurants in Allerton, Bronx:0
( 52 / 52 ) Italian Restaurants in Kingsbridge Heights, Bronx:0
In [27]:
# prepare neighborhood list that contains Italian restaurants in Brooklyn
column_names=['Borough', 'Neighborhood', 'ID','Name']
italian_rest_Brooklyn=pd.DataFrame(columns=column_names)
count=1
for row in new_york_data_Brooklyn.values.tolist():
    Borough, Neighborhood, Latitude, Longitude=row
    venues = get_venues(Latitude,Longitude)
    italian_restaurants=venues[venues['Category']=='Italian Restaurant']   
    print('(',count,'/',len(new_york_data_Brooklyn),')','Italian Restaurants in '+Neighborhood+', '+Borough+':'+str(len(italian_restaurants)))
    for restaurant_detail in italian_restaurants.values.tolist():
        id, name , category=restaurant_detail
        italian_rest_Brooklyn = italian_rest_Brooklyn.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name
                                               }, ignore_index=True)
    count+=1
( 1 / 70 ) Italian Restaurants in Bay Ridge, Brooklyn:6
( 2 / 70 ) Italian Restaurants in Bensonhurst, Brooklyn:4
( 3 / 70 ) Italian Restaurants in Sunset Park, Brooklyn:1
( 4 / 70 ) Italian Restaurants in Greenpoint, Brooklyn:2
( 5 / 70 ) Italian Restaurants in Gravesend, Brooklyn:1
( 6 / 70 ) Italian Restaurants in Brighton Beach, Brooklyn:0
( 7 / 70 ) Italian Restaurants in Sheepshead Bay, Brooklyn:5
( 8 / 70 ) Italian Restaurants in Manhattan Terrace, Brooklyn:0
( 9 / 70 ) Italian Restaurants in Flatbush, Brooklyn:1
( 10 / 70 ) Italian Restaurants in Crown Heights, Brooklyn:0
( 11 / 70 ) Italian Restaurants in East Flatbush, Brooklyn:0
( 12 / 70 ) Italian Restaurants in Kensington, Brooklyn:0
( 13 / 70 ) Italian Restaurants in Windsor Terrace, Brooklyn:5
( 14 / 70 ) Italian Restaurants in Prospect Heights, Brooklyn:0
( 15 / 70 ) Italian Restaurants in Brownsville, Brooklyn:0
( 16 / 70 ) Italian Restaurants in Williamsburg, Brooklyn:1
( 17 / 70 ) Italian Restaurants in Bushwick, Brooklyn:2
( 18 / 70 ) Italian Restaurants in Bedford Stuyvesant, Brooklyn:0
( 19 / 70 ) Italian Restaurants in Brooklyn Heights, Brooklyn:4
( 20 / 70 ) Italian Restaurants in Cobble Hill, Brooklyn:6
( 21 / 70 ) Italian Restaurants in Carroll Gardens, Brooklyn:7
( 22 / 70 ) Italian Restaurants in Red Hook, Brooklyn:0
( 23 / 70 ) Italian Restaurants in Gowanus, Brooklyn:4
( 24 / 70 ) Italian Restaurants in Fort Greene, Brooklyn:5
( 25 / 70 ) Italian Restaurants in Park Slope, Brooklyn:1
( 26 / 70 ) Italian Restaurants in Cypress Hills, Brooklyn:0
( 27 / 70 ) Italian Restaurants in East New York, Brooklyn:0
( 28 / 70 ) Italian Restaurants in Starrett City, Brooklyn:1
( 29 / 70 ) Italian Restaurants in Canarsie, Brooklyn:0
( 30 / 70 ) Italian Restaurants in Flatlands, Brooklyn:0
( 31 / 70 ) Italian Restaurants in Mill Island, Brooklyn:0
( 32 / 70 ) Italian Restaurants in Manhattan Beach, Brooklyn:5
( 33 / 70 ) Italian Restaurants in Coney Island, Brooklyn:1
( 34 / 70 ) Italian Restaurants in Bath Beach, Brooklyn:3
( 35 / 70 ) Italian Restaurants in Borough Park, Brooklyn:0
( 36 / 70 ) Italian Restaurants in Dyker Heights, Brooklyn:3
( 37 / 70 ) Italian Restaurants in Gerritsen Beach, Brooklyn:2
( 38 / 70 ) Italian Restaurants in Marine Park, Brooklyn:2
( 39 / 70 ) Italian Restaurants in Clinton Hill, Brooklyn:6
( 40 / 70 ) Italian Restaurants in Sea Gate, Brooklyn:0
( 41 / 70 ) Italian Restaurants in Downtown, Brooklyn:1
( 42 / 70 ) Italian Restaurants in Boerum Hill, Brooklyn:1
( 43 / 70 ) Italian Restaurants in Prospect Lefferts Gardens, Brooklyn:2
( 44 / 70 ) Italian Restaurants in Ocean Hill, Brooklyn:0
( 45 / 70 ) Italian Restaurants in City Line, Brooklyn:0
( 46 / 70 ) Italian Restaurants in Bergen Beach, Brooklyn:1
( 47 / 70 ) Italian Restaurants in Midwood, Brooklyn:0
( 48 / 70 ) Italian Restaurants in Prospect Park South, Brooklyn:1
( 49 / 70 ) Italian Restaurants in Georgetown, Brooklyn:4
( 50 / 70 ) Italian Restaurants in East Williamsburg, Brooklyn:3
( 51 / 70 ) Italian Restaurants in North Side, Brooklyn:2
( 52 / 70 ) Italian Restaurants in South Side, Brooklyn:0
( 53 / 70 ) Italian Restaurants in Ocean Parkway, Brooklyn:3
( 54 / 70 ) Italian Restaurants in Fort Hamilton, Brooklyn:5
( 55 / 70 ) Italian Restaurants in Ditmas Park, Brooklyn:1
( 56 / 70 ) Italian Restaurants in Wingate, Brooklyn:0
( 57 / 70 ) Italian Restaurants in Rugby, Brooklyn:0
( 58 / 70 ) Italian Restaurants in Remsen Village, Brooklyn:1
( 59 / 70 ) Italian Restaurants in New Lots, Brooklyn:0
( 60 / 70 ) Italian Restaurants in Paerdegat Basin, Brooklyn:0
( 61 / 70 ) Italian Restaurants in Mill Basin, Brooklyn:3
( 62 / 70 ) Italian Restaurants in Fulton Ferry, Brooklyn:2
( 63 / 70 ) Italian Restaurants in Vinegar Hill, Brooklyn:2
( 64 / 70 ) Italian Restaurants in Weeksville, Brooklyn:0
( 65 / 70 ) Italian Restaurants in Broadway Junction, Brooklyn:0
( 66 / 70 ) Italian Restaurants in Dumbo, Brooklyn:2
( 67 / 70 ) Italian Restaurants in Homecrest, Brooklyn:1
( 68 / 70 ) Italian Restaurants in Highland Park, Brooklyn:0
( 69 / 70 ) Italian Restaurants in Madison, Brooklyn:1
( 70 / 70 ) Italian Restaurants in Erasmus, Brooklyn:0
In [30]:
# prepare neighborhood list that contains Italian restaurants in Manhattan
column_names=['Borough', 'Neighborhood', 'ID','Name']
italian_rest_Manhattan=pd.DataFrame(columns=column_names)
count=1
for row in new_york_data_Manhattan.values.tolist():
    Borough, Neighborhood, Latitude, Longitude=row
    venues = get_venues(Latitude,Longitude)
    italian_restaurants=venues[venues['Category']=='Italian Restaurant']   
    print('(',count,'/',len(new_york_data_Manhattan),')','Italian Restaurants in '+Neighborhood+', '+Borough+':'+str(len(italian_restaurants)))
    for restaurant_detail in italian_restaurants.values.tolist():
        id, name , category=restaurant_detail
        italian_rest_Manhattan = italian_rest_Manhattan.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name
                                               }, ignore_index=True)
    count+=1
( 1 / 40 ) Italian Restaurants in Marble Hill, Manhattan:0
( 2 / 40 ) Italian Restaurants in Chinatown, Manhattan:0
( 3 / 40 ) Italian Restaurants in Washington Heights, Manhattan:1
( 4 / 40 ) Italian Restaurants in Inwood, Manhattan:0
( 5 / 40 ) Italian Restaurants in Hamilton Heights, Manhattan:2
( 6 / 40 ) Italian Restaurants in Manhattanville, Manhattan:4
( 7 / 40 ) Italian Restaurants in Central Harlem, Manhattan:1
( 8 / 40 ) Italian Restaurants in East Harlem, Manhattan:3
( 9 / 40 ) Italian Restaurants in Upper East Side, Manhattan:7
( 10 / 40 ) Italian Restaurants in Yorkville, Manhattan:6
( 11 / 40 ) Italian Restaurants in Lenox Hill, Manhattan:6
( 12 / 40 ) Italian Restaurants in Roosevelt Island, Manhattan:1
( 13 / 40 ) Italian Restaurants in Upper West Side, Manhattan:5
( 14 / 40 ) Italian Restaurants in Lincoln Square, Manhattan:5
( 15 / 40 ) Italian Restaurants in Clinton, Manhattan:4
( 16 / 40 ) Italian Restaurants in Midtown, Manhattan:0
( 17 / 40 ) Italian Restaurants in Murray Hill, Manhattan:0
( 18 / 40 ) Italian Restaurants in Chelsea, Manhattan:2
( 19 / 40 ) Italian Restaurants in Greenwich Village, Manhattan:11
( 20 / 40 ) Italian Restaurants in East Village, Manhattan:2
( 21 / 40 ) Italian Restaurants in Lower East Side, Manhattan:6
( 22 / 40 ) Italian Restaurants in Tribeca, Manhattan:4
( 23 / 40 ) Italian Restaurants in Little Italy, Manhattan:4
( 24 / 40 ) Italian Restaurants in Soho, Manhattan:7
( 25 / 40 ) Italian Restaurants in West Village, Manhattan:10
( 26 / 40 ) Italian Restaurants in Manhattan Valley, Manhattan:2
( 27 / 40 ) Italian Restaurants in Morningside Heights, Manhattan:5
( 28 / 40 ) Italian Restaurants in Gramercy, Manhattan:4
( 29 / 40 ) Italian Restaurants in Battery Park City, Manhattan:2
( 30 / 40 ) Italian Restaurants in Financial District, Manhattan:2
( 31 / 40 ) Italian Restaurants in Carnegie Hill, Manhattan:3
( 32 / 40 ) Italian Restaurants in Noho, Manhattan:6
( 33 / 40 ) Italian Restaurants in Civic Center, Manhattan:3
( 34 / 40 ) Italian Restaurants in Midtown South, Manhattan:2
( 35 / 40 ) Italian Restaurants in Sutton Place, Manhattan:5
( 36 / 40 ) Italian Restaurants in Turtle Bay, Manhattan:3
( 37 / 40 ) Italian Restaurants in Tudor City, Manhattan:1
( 38 / 40 ) Italian Restaurants in Stuyvesant Town, Manhattan:3
( 39 / 40 ) Italian Restaurants in Flatiron, Manhattan:3
( 40 / 40 ) Italian Restaurants in Hudson Yards, Manhattan:3
In [31]:
# prepare neighborhood list that contains Italian restaurants in Queens
column_names=['Borough', 'Neighborhood', 'ID','Name']
italian_rest_Queens=pd.DataFrame(columns=column_names)
count=1
for row in new_york_data_Queens.values.tolist():
    Borough, Neighborhood, Latitude, Longitude=row
    venues = get_venues(Latitude,Longitude)
    italian_restaurants=venues[venues['Category']=='Italian Restaurant']   
    print('(',count,'/',len(new_york_data_Queens),')','Italian Restaurants in '+Neighborhood+', '+Borough+':'+str(len(italian_restaurants)))
    for restaurant_detail in italian_restaurants.values.tolist():
        id, name , category=restaurant_detail
        italian_rest_Queens = italian_rest_Queens.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name
                                               }, ignore_index=True)
    count+=1
( 1 / 81 ) Italian Restaurants in Astoria, Queens:3
( 2 / 81 ) Italian Restaurants in Woodside, Queens:1
( 3 / 81 ) Italian Restaurants in Jackson Heights, Queens:1
( 4 / 81 ) Italian Restaurants in Elmhurst, Queens:0
( 5 / 81 ) Italian Restaurants in Howard Beach, Queens:4
( 6 / 81 ) Italian Restaurants in Corona, Queens:3
( 7 / 81 ) Italian Restaurants in Forest Hills, Queens:2
( 8 / 81 ) Italian Restaurants in Kew Gardens, Queens:1
( 9 / 81 ) Italian Restaurants in Richmond Hill, Queens:1
( 10 / 81 ) Italian Restaurants in Flushing, Queens:0
( 11 / 81 ) Italian Restaurants in Long Island City, Queens:2
( 12 / 81 ) Italian Restaurants in Sunnyside, Queens:2
( 13 / 81 ) Italian Restaurants in East Elmhurst, Queens:1
( 14 / 81 ) Italian Restaurants in Maspeth, Queens:2
( 15 / 81 ) Italian Restaurants in Ridgewood, Queens:3
( 16 / 81 ) Italian Restaurants in Glendale, Queens:1
( 17 / 81 ) Italian Restaurants in Rego Park, Queens:1
( 18 / 81 ) Italian Restaurants in Woodhaven, Queens:0
( 19 / 81 ) Italian Restaurants in Ozone Park, Queens:1
( 20 / 81 ) Italian Restaurants in South Ozone Park, Queens:1
( 21 / 81 ) Italian Restaurants in College Point, Queens:0
( 22 / 81 ) Italian Restaurants in Whitestone, Queens:5
( 23 / 81 ) Italian Restaurants in Bayside, Queens:3
( 24 / 81 ) Italian Restaurants in Auburndale, Queens:3
( 25 / 81 ) Italian Restaurants in Little Neck, Queens:6
( 26 / 81 ) Italian Restaurants in Douglaston, Queens:5
( 27 / 81 ) Italian Restaurants in Glen Oaks, Queens:1
( 28 / 81 ) Italian Restaurants in Bellerose, Queens:2
( 29 / 81 ) Italian Restaurants in Kew Gardens Hills, Queens:0
( 30 / 81 ) Italian Restaurants in Fresh Meadows, Queens:0
( 31 / 81 ) Italian Restaurants in Briarwood, Queens:0
( 32 / 81 ) Italian Restaurants in Jamaica Center, Queens:0
( 33 / 81 ) Italian Restaurants in Oakland Gardens, Queens:2
( 34 / 81 ) Italian Restaurants in Queens Village, Queens:0
( 35 / 81 ) Italian Restaurants in Hollis, Queens:0
( 36 / 81 ) Italian Restaurants in South Jamaica, Queens:0
( 37 / 81 ) Italian Restaurants in St. Albans, Queens:0
( 38 / 81 ) Italian Restaurants in Rochdale, Queens:0
( 39 / 81 ) Italian Restaurants in Springfield Gardens, Queens:0
( 40 / 81 ) Italian Restaurants in Cambria Heights, Queens:0
( 41 / 81 ) Italian Restaurants in Rosedale, Queens:0
( 42 / 81 ) Italian Restaurants in Far Rockaway, Queens:0
( 43 / 81 ) Italian Restaurants in Broad Channel, Queens:0
( 44 / 81 ) Italian Restaurants in Breezy Point, Queens:0
( 45 / 81 ) Italian Restaurants in Steinway, Queens:5
( 46 / 81 ) Italian Restaurants in Beechhurst, Queens:5
( 47 / 81 ) Italian Restaurants in Bay Terrace, Queens:1
( 48 / 81 ) Italian Restaurants in Edgemere, Queens:0
( 49 / 81 ) Italian Restaurants in Arverne, Queens:0
( 50 / 81 ) Italian Restaurants in Rockaway Beach, Queens:0
( 51 / 81 ) Italian Restaurants in Neponsit, Queens:1
( 52 / 81 ) Italian Restaurants in Murray Hill, Queens:0
( 53 / 81 ) Italian Restaurants in Floral Park, Queens:1
( 54 / 81 ) Italian Restaurants in Holliswood, Queens:0
( 55 / 81 ) Italian Restaurants in Jamaica Estates, Queens:0
( 56 / 81 ) Italian Restaurants in Queensboro Hill, Queens:0
( 57 / 81 ) Italian Restaurants in Hillcrest, Queens:1
( 58 / 81 ) Italian Restaurants in Ravenswood, Queens:5
( 59 / 81 ) Italian Restaurants in Lindenwood, Queens:2
( 60 / 81 ) Italian Restaurants in Laurelton, Queens:0
( 61 / 81 ) Italian Restaurants in Lefrak City, Queens:2
( 62 / 81 ) Italian Restaurants in Belle Harbor, Queens:1
( 63 / 81 ) Italian Restaurants in Rockaway Park, Queens:1
( 64 / 81 ) Italian Restaurants in Somerville, Queens:0
( 65 / 81 ) Italian Restaurants in Brookville, Queens:0
( 66 / 81 ) Italian Restaurants in Bellaire, Queens:2
( 67 / 81 ) Italian Restaurants in North Corona, Queens:0
( 68 / 81 ) Italian Restaurants in Forest Hills Gardens, Queens:2
( 69 / 81 ) Italian Restaurants in Jamaica Hills, Queens:0
( 70 / 81 ) Italian Restaurants in Utopia, Queens:1
( 71 / 81 ) Italian Restaurants in Pomonok, Queens:1
( 72 / 81 ) Italian Restaurants in Astoria Heights, Queens:3
( 73 / 81 ) Italian Restaurants in Hunters Point, Queens:7
( 74 / 81 ) Italian Restaurants in Sunnyside Gardens, Queens:3
( 75 / 81 ) Italian Restaurants in Blissville, Queens:0
( 76 / 81 ) Italian Restaurants in Roxbury, Queens:0
( 77 / 81 ) Italian Restaurants in Middle Village, Queens:1
( 78 / 81 ) Italian Restaurants in Malba, Queens:1
( 79 / 81 ) Italian Restaurants in Hammels, Queens:0
( 80 / 81 ) Italian Restaurants in Bayswater, Queens:0
( 81 / 81 ) Italian Restaurants in Queensbridge, Queens:3
In [32]:
# prepare neighborhood list that contains Italian restaurants in Staten Island
column_names=['Borough', 'Neighborhood', 'ID','Name']
italian_rest_Staten_Island=pd.DataFrame(columns=column_names)
count=1
for row in new_york_data_Staten_Island.values.tolist():
    Borough, Neighborhood, Latitude, Longitude=row
    venues = get_venues(Latitude,Longitude)
    italian_restaurants=venues[venues['Category']=='Italian Restaurant']   
    print('(',count,'/',len(new_york_data_Staten_Island),')','Italian Restaurants in '+Neighborhood+', '+Borough+':'+str(len(italian_restaurants)))
    for restaurant_detail in italian_restaurants.values.tolist():
        id, name , category=restaurant_detail
        italian_rest_Staten_Island = italian_rest_Staten_Island.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name
                                               }, ignore_index=True)
    count+=1
( 1 / 63 ) Italian Restaurants in St. George, Staten Island:3
( 2 / 63 ) Italian Restaurants in New Brighton, Staten Island:3
( 3 / 63 ) Italian Restaurants in Stapleton, Staten Island:0
( 4 / 63 ) Italian Restaurants in Rosebank, Staten Island:4
( 5 / 63 ) Italian Restaurants in West Brighton, Staten Island:3
( 6 / 63 ) Italian Restaurants in Grymes Hill, Staten Island:0
( 7 / 63 ) Italian Restaurants in Todt Hill, Staten Island:0
( 8 / 63 ) Italian Restaurants in South Beach, Staten Island:0
( 9 / 63 ) Italian Restaurants in Port Richmond, Staten Island:0
( 10 / 63 ) Italian Restaurants in Mariner's Harbor, Staten Island:1
( 11 / 63 ) Italian Restaurants in Port Ivory, Staten Island:0
( 12 / 63 ) Italian Restaurants in Castleton Corners, Staten Island:2
( 13 / 63 ) Italian Restaurants in New Springville, Staten Island:0
( 14 / 63 ) Italian Restaurants in Travis, Staten Island:1
( 15 / 63 ) Italian Restaurants in New Dorp, Staten Island:5
( 16 / 63 ) Italian Restaurants in Oakwood, Staten Island:0
( 17 / 63 ) Italian Restaurants in Great Kills, Staten Island:6
( 18 / 63 ) Italian Restaurants in Eltingville, Staten Island:3
( 19 / 63 ) Italian Restaurants in Annadale, Staten Island:0
( 20 / 63 ) Italian Restaurants in Woodrow, Staten Island:1
( 21 / 63 ) Italian Restaurants in Tottenville, Staten Island:3
( 22 / 63 ) Italian Restaurants in Tompkinsville, Staten Island:3
( 23 / 63 ) Italian Restaurants in Silver Lake, Staten Island:0
( 24 / 63 ) Italian Restaurants in Sunnyside, Staten Island:0
( 25 / 63 ) Italian Restaurants in Park Hill, Staten Island:0
( 26 / 63 ) Italian Restaurants in Westerleigh, Staten Island:1
( 27 / 63 ) Italian Restaurants in Graniteville, Staten Island:0
( 28 / 63 ) Italian Restaurants in Arlington, Staten Island:0
( 29 / 63 ) Italian Restaurants in Arrochar, Staten Island:2
( 30 / 63 ) Italian Restaurants in Grasmere, Staten Island:4
( 31 / 63 ) Italian Restaurants in Old Town, Staten Island:7
( 32 / 63 ) Italian Restaurants in Dongan Hills, Staten Island:7
( 33 / 63 ) Italian Restaurants in Midland Beach, Staten Island:0
( 34 / 63 ) Italian Restaurants in Grant City, Staten Island:4
( 35 / 63 ) Italian Restaurants in New Dorp Beach, Staten Island:1
( 36 / 63 ) Italian Restaurants in Bay Terrace, Staten Island:5
( 37 / 63 ) Italian Restaurants in Huguenot, Staten Island:1
( 38 / 63 ) Italian Restaurants in Pleasant Plains, Staten Island:0
( 39 / 63 ) Italian Restaurants in Butler Manor, Staten Island:0
( 40 / 63 ) Italian Restaurants in Charleston, Staten Island:4
( 41 / 63 ) Italian Restaurants in Rossville, Staten Island:0
( 42 / 63 ) Italian Restaurants in Arden Heights, Staten Island:1
( 43 / 63 ) Italian Restaurants in Greenridge, Staten Island:1
( 44 / 63 ) Italian Restaurants in Heartland Village, Staten Island:0
( 45 / 63 ) Italian Restaurants in Chelsea, Staten Island:1
( 46 / 63 ) Italian Restaurants in Bloomfield, Staten Island:0
( 47 / 63 ) Italian Restaurants in Bulls Head, Staten Island:2
( 48 / 63 ) Italian Restaurants in Richmond Town, Staten Island:3
( 49 / 63 ) Italian Restaurants in Shore Acres, Staten Island:4
( 50 / 63 ) Italian Restaurants in Clifton, Staten Island:2
( 51 / 63 ) Italian Restaurants in Concord, Staten Island:4
( 52 / 63 ) Italian Restaurants in Emerson Hill, Staten Island:1
( 53 / 63 ) Italian Restaurants in Randall Manor, Staten Island:1
( 54 / 63 ) Italian Restaurants in Howland Hook, Staten Island:0
( 55 / 63 ) Italian Restaurants in Elm Park, Staten Island:1
( 56 / 63 ) Italian Restaurants in Manor Heights, Staten Island:0
( 57 / 63 ) Italian Restaurants in Willowbrook, Staten Island:1
( 58 / 63 ) Italian Restaurants in Sandy Ground, Staten Island:1
( 59 / 63 ) Italian Restaurants in Egbertville, Staten Island:1
( 60 / 63 ) Italian Restaurants in Prince's Bay, Staten Island:1
( 61 / 63 ) Italian Restaurants in Lighthouse Hill, Staten Island:2
( 62 / 63 ) Italian Restaurants in Richmond Valley, Staten Island:3
( 63 / 63 ) Italian Restaurants in Fox Hills, Staten Island:0

Compile the list of all Italian restaurants in all 5 Boroughs from the above data

In [33]:
italian_rest_ny = italian_rest_Bronx.append(italian_rest_Brooklyn, ignore_index=True).append(italian_rest_Manhattan, ignore_index=True).append(italian_rest_Queens, ignore_index=True).append(italian_rest_Staten_Island, ignore_index=True)
In [34]:
italian_rest_ny.shape
Out[34]:
(548, 4)
In [35]:
italian_rest_ny['Borough'].value_counts().sort_values(ascending=False)
Out[35]:
Manhattan        138
Brooklyn         114
Queens           106
Staten Island    104
Bronx             86
Name: Borough, dtype: int64

Plot the number of Italian Restaurants in each Borough

In [36]:
plt.figure(figsize=(9,5), dpi = 100)
# title
plt.title('Number of Italian Restaurants for each Borough in New York City')
#On x-axis
plt.xlabel('Borough', fontsize = 15)
#On y-axis
plt.ylabel('No.of Italian Restaurants', fontsize=15)
#giving a bar plot
italian_rest_ny.groupby('Borough')['ID'].count().plot(kind='bar')
#legend
plt.legend()
#displays the plot
plt.show()
In [37]:
italian_rest_ny['Neighborhood'].value_counts().sort_values(ascending=False)
Out[37]:
Belmont                      15
Greenwich Village            11
West Village                 10
Fordham                      10
Carroll Gardens               7
Old Town                      7
Upper East Side               7
Dongan Hills                  7
Hunters Point                 7
Soho                          7
Lenox Hill                    6
Little Neck                   6
Bay Terrace                   6
Great Kills                   6
Throgs Neck                   6
Clinton Hill                  6
Edgewater Park                6
Lower East Side               6
Noho                          6
Bay Ridge                     6
Cobble Hill                   6
Yorkville                     6
Sutton Place                  5
Beechhurst                    5
Fort Greene                   5
Morningside Heights           5
Morris Park                   5
Manhattan Beach               5
Upper West Side               5
Ravenswood                    5
Whitestone                    5
Bronxdale                     5
Douglaston                    5
Windsor Terrace               5
Sheepshead Bay                5
Lincoln Square                5
New Dorp                      5
Steinway                      5
Fort Hamilton                 5
Manhattanville                4
Little Italy                  4
Grasmere                      4
Charleston                    4
Country Club                  4
Concord                       4
Bensonhurst                   4
Grant City                    4
Brooklyn Heights              4
Rosebank                      4
Shore Acres                   4
Gowanus                       4
Georgetown                    4
Tribeca                       4
Howard Beach                  4
Clinton                       4
Gramercy                      4
Pelham Bay                    4
East Williamsburg             3
Richmond Valley               3
Eltingville                   3
Carnegie Hill                 3
Bath Beach                    3
Tottenville                   3
Queensbridge                  3
Dyker Heights                 3
Bayside                       3
Hudson Yards                  3
Ridgewood                     3
St. George                    3
Astoria Heights               3
Stuyvesant Town               3
Auburndale                    3
Pelham Parkway                3
Mill Basin                    3
Richmond Town                 3
Corona                        3
Astoria                       3
Chelsea                       3
Turtle Bay                    3
Ocean Parkway                 3
City Island                   3
New Brighton                  3
Schuylerville                 3
Civic Center                  3
Tompkinsville                 3
Sunnyside Gardens             3
Flatiron                      3
East Harlem                   3
West Brighton                 3
Prospect Lefferts Gardens     2
Woodlawn                      2
Bulls Head                    2
Manhattan Valley              2
Melrose                       2
Vinegar Hill                  2
Financial District            2
Bellaire                      2
Lindenwood                    2
Concourse Village             2
Forest Hills                  2
Fulton Ferry                  2
Lefrak City                   2
Castleton Corners             2
East Village                  2
Lighthouse Hill               2
Forest Hills Gardens          2
Clifton                       2
Sunnyside                     2
Greenpoint                    2
Midtown South                 2
North Riverdale               2
Hamilton Heights              2
Baychester                    2
Arrochar                      2
Oakland Gardens               2
Gerritsen Beach               2
North Side                    2
Bushwick                      2
Bellerose                     2
Dumbo                         2
Long Island City              2
Maspeth                       2
Van Nest                      2
Battery Park City             2
Westchester Square            2
Marine Park                   2
Park Slope                    1
Prince's Bay                  1
Jackson Heights               1
Roosevelt Island              1
Hillcrest                     1
South Ozone Park              1
Egbertville                   1
Belle Harbor                  1
Rockaway Park                 1
Middle Village                1
Elm Park                      1
Bedford Park                  1
Pomonok                       1
Glendale                      1
Willowbrook                   1
Travis                        1
Concourse                     1
Prospect Park South           1
Mott Haven                    1
Sunset Park                   1
Glen Oaks                     1
Kew Gardens                   1
Utopia                        1
Ditmas Park                   1
Sandy Ground                  1
Homecrest                     1
Kingsbridge                   1
Remsen Village                1
Ozone Park                    1
Washington Heights            1
Gravesend                     1
Bergen Beach                  1
Morrisania                    1
Central Harlem                1
Mariner's Harbor              1
Huguenot                      1
Rego Park                     1
Downtown                      1
Arden Heights                 1
Floral Park                   1
Boerum Hill                   1
Woodrow                       1
Westerleigh                   1
Flatbush                      1
Madison                       1
Spuyten Duyvil                1
Coney Island                  1
Williamsburg                  1
Starrett City                 1
Pelham Gardens                1
Emerson Hill                  1
Riverdale                     1
New Dorp Beach                1
Tudor City                    1
Malba                         1
Randall Manor                 1
Woodside                      1
Neponsit                      1
East Elmhurst                 1
Greenridge                    1
Richmond Hill                 1
Name: Neighborhood, dtype: int64

Plot Top 5 Neighborhoods with Italian Restaurants

In [38]:
plt.figure(figsize=(9,5), dpi = 100)
# title
plt.title('Number of Italian Restaurants for each Neighborhood in New York City')
#On x-axis
plt.xlabel('Neighborhood', fontsize = 15)
#On y-axis
plt.ylabel('No.of Italian Restaurants', fontsize=15)
#giving a bar plot
italian_rest_ny.groupby('Neighborhood')['ID'].count().nlargest(5).plot(kind='bar')
#legend
plt.legend()
#displays the plot
plt.show()
In [39]:
italian_rest_ny[italian_rest_ny['Neighborhood']=='Belmont']
Out[39]:
Borough Neighborhood ID Name
46 Bronx Belmont 4acf80aef964a52025d420e3 Tino's Delicatessen
47 Bronx Belmont 4bb6470cef159c7465b275f7 Calabria Pork Store
48 Bronx Belmont 4af0fa29f964a52060e021e3 Antonio's Trattoria
49 Bronx Belmont 59050f51b23dfa5f6649e678 Arthur Avenue Fiasco
50 Bronx Belmont 4aa425bef964a5208e4520e3 Dominick's Restaurant
51 Bronx Belmont 4b5514c4f964a5207cda27e3 Enzo's
52 Bronx Belmont 4af71916f964a520cf0522e3 Michaelangelo's Coal Fired Brick Oven Pizza Re...
53 Bronx Belmont 4b5a4c8ff964a52049bb28e3 Emilia's Restaurant
54 Bronx Belmont 4c9b9e7b9c663704b90463fd Gerbasi Ristorante
55 Bronx Belmont 4aa193d5f964a520124120e3 Mario's Restaurant & Catering
56 Bronx Belmont 4a8e261cf964a5201c1220e3 Roberto's
57 Bronx Belmont 4c79d294278eb713f6a05580 Cafe al Mercato
58 Bronx Belmont 4cb0d382ef1b370419643e00 David Greco's Arthur Avenue Trattoria
59 Bronx Belmont 4b5bc595f964a520431529e3 Pasquale Riggaletto's
60 Bronx Belmont 53ff939c498e6b601dfa3979 San Gennaro Ristorante

Get details of Italian Restaurants in Bronx

In [40]:
# prepare neighborhood list that contains italian restaurants in Bronx
column_names=['Borough', 'Neighborhood', 'ID','Name','Likes','Rating','Tips']
italian_rest_stats_Bronx=pd.DataFrame(columns=column_names)
count=1


for row in italian_rest_Bronx.values.tolist():
    Borough,Neighborhood,ID,Name=row
    try:
        venue_details=get_venue_details(ID)
        print(venue_details)
        id,name,likes,rating,tips=venue_details.values.tolist()[0]
    except IndexError:
        print('No data available for id=',ID)
        # we will assign 0 value for these restaurants as they may have been 
        #recently opened or details does not exist in FourSquare Database
        id,name,likes,rating,tips=[0]*5
    print('(',count,'/',len(italian_rest_Bronx),')','processed')
    italian_rest_stats_Bronx = italian_rest_stats_Bronx.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name,
                                                'Likes' : likes,
                                                'Rating' : rating,
                                                'Tips' : tips
                                               }, ignore_index=True)
    count+=1
                         ID                  Name  Likes  Rating  Tips
0  55aaee4d498e3cbb70e625d6  Bella Notte Pizzeria      9     7.1     4
( 1 / 86 ) processed
                         ID                  Name  Likes  Rating  Tips
0  55aaee4d498e3cbb70e625d6  Bella Notte Pizzeria      9     7.1     4
( 2 / 86 ) processed
                         ID                    Name  Likes  Rating  Tips
0  511edb6de4b0d58346fd272d  Patrizia's Of Woodlawn     18     8.4    14
( 3 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  4d3cb3026b3d236a066a6364  Rivers Edge     10     6.7     8
( 4 / 86 ) processed
                         ID        Name  Likes  Rating  Tips
0  4c9518076b35a143d5dc21dc  Fratelli's     22     8.6     6
( 5 / 86 ) processed
                         ID          Name  Likes  Rating  Tips
0  5411894d498e4a254a11a46c  Olive Garden     26     7.4     8
( 6 / 86 ) processed
                         ID    Name  Likes  Rating  Tips
0  4bf96ae65317a593d837017f  Enzo's     26     8.6    11
( 7 / 86 ) processed
                         ID        Name  Likes  Rating  Tips
0  4b10591af964a5205f6e23e3  Patricia's     84     8.5    39
( 8 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  4b47f069f964a5208c4426e3  Pasta Pasta      9     6.3     8
( 9 / 86 ) processed
                         ID                       Name  Likes  Rating  Tips
0  4514ed4df964a520e5391fe3  Artie's Steak and Seafood     44     8.2    27
( 10 / 86 ) processed
                         ID                      Name  Likes  Rating  Tips
0  55905336498e1a9217de2a7a  Scavello's On The Island     13     8.5     2
( 11 / 86 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4b80a1c3f964a520488230e3  Portofino Restaurant     10     6.1    10
( 12 / 86 ) processed
                         ID          Name  Likes  Rating  Tips
0  4b1712a8f964a520dbc123e3  Jolly Tinker     19     7.1     4
( 13 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4acf80aef964a52025d420e3  Tino's Delicatessen    145     9.3    48
( 14 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bb6470cef159c7465b275f7  Calabria Pork Store     30     8.9    13
( 15 / 86 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4aa425bef964a5208e4520e3  Dominick's Restaurant    101     8.4    37
( 16 / 86 ) processed
                         ID                  Name  Likes  Rating  Tips
0  59050f51b23dfa5f6649e678  Arthur Avenue Fiasco     10     8.2     4
( 17 / 86 ) processed
                         ID    Name  Likes  Rating  Tips
0  4b5514c4f964a5207cda27e3  Enzo's     43     8.2    19
( 18 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4b5a4c8ff964a52049bb28e3  Emilia's Restaurant     32     8.1    16
( 19 / 86 ) processed
                         ID  \
0  4af71916f964a520cf0522e3   

                                                Name  Likes  Rating  Tips  
0  Michaelangelo's Coal Fired Brick Oven Pizza Re...     39     7.8    25  
( 20 / 86 ) processed
                         ID                Name  Likes  Rating  Tips
0  4c9b9e7b9c663704b90463fd  Gerbasi Ristorante     15     7.7    12
( 21 / 86 ) processed
                         ID                    Name  Likes  Rating  Tips
0  53ff939c498e6b601dfa3979  San Gennaro Ristorante     17     7.1     1
( 22 / 86 ) processed
                         ID  \
0  4bc67f1104e8b713a833362d   

                                                Name  Likes  Rating  Tips  
0  Ann & Tony's - An Original Arthur Avenue Resta...     12     7.1     8  
( 23 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  5956be26123a195de6701c2b  Porto Salvo     10     8.4     5
( 24 / 86 ) processed
                         ID                          Name  Likes  Rating  Tips
0  4bb692672ea19521a6ecab2f  Venice Restaurant & Pizzeria      8     6.8     9
( 25 / 86 ) processed
                         ID     Name  Likes  Rating  Tips
0  4e6acfb1ae60950955a9b02b  Wish 37      3     6.6     6
( 26 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  5956be26123a195de6701c2b  Porto Salvo     10     8.4     5
( 27 / 86 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b4e3e87f964a5209de626e3  Patricia's of Tremont     48     8.2    29
( 28 / 86 ) processed
                         ID            Name  Likes  Rating  Tips
0  4b958fccf964a52091a934e3  Ice House Cafe     11     7.4    14
( 29 / 86 ) processed
                         ID           Name  Likes  Rating  Tips
0  4d4456d93616b60c953fe3c2  Tosca Marquee     20     6.8    14
( 30 / 86 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4c1d717b8b3aa59363a99a5f  Spoto's Italian Restaurant      6     6.6    11
( 31 / 86 ) processed
                         ID                         Name  Likes  Rating  Tips
0  4b6cb1c0f964a520d04c2ce3  Mamma Lucia's Pizza & Pasta      3     6.6    10
( 32 / 86 ) processed
                         ID                       Name  Likes  Rating  Tips
0  4b491198f964a5208f6426e3  Rino's Italian Restaurant      6     6.6     1
( 33 / 86 ) processed
                         ID                      Name  Likes  Rating  Tips
0  4c9e1ef2542b224b70a3f09f  Lucca Italian Restaurant      7     7.7     4
( 34 / 86 ) processed
                         ID                           Name  Likes  Rating  \
0  4b85b6b3f964a5209b6e31e3  Giovanni's Italian Restaurant     11     7.5   

   Tips  
0    10  
( 35 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  4b634812f964a520936f2ae3  Vito's Deli      6     6.8     5
( 36 / 86 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 51f69c7a498e0655f8d77b3e
( 37 / 86 ) processed
                         ID       Name  Likes  Rating  Tips
0  51aa5120498ec578a5ad0ac4  The Pines      4     6.9     4
( 38 / 86 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4cafccb6eb65b1f70ff766cd
( 39 / 86 ) processed
                         ID               Name  Likes  Rating  Tips
0  3fd66200f964a5207bf11ee3  F & J Pine Tavern    176     8.7    72
( 40 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bd1d5fdcaff95211c6ed1f0  900 Park Restaurant     57     7.3    19
( 41 / 86 ) processed
                         ID        Name  Likes  Rating  Tips
0  4b10591af964a5205f6e23e3  Patricia's     84     8.5    39
( 42 / 86 ) processed
                         ID    Name  Likes  Rating  Tips
0  4bf96ae65317a593d837017f  Enzo's     26     8.6    11
( 43 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bd1d5fdcaff95211c6ed1f0  900 Park Restaurant     57     7.3    19
( 44 / 86 ) processed
                         ID       Name  Likes  Rating  Tips
0  51aa5120498ec578a5ad0ac4  The Pines      4     6.9     4
( 45 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  4b47f069f964a5208c4426e3  Pasta Pasta      9     6.3     8
( 46 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4acf80aef964a52025d420e3  Tino's Delicatessen    145     9.3    48
( 47 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bb6470cef159c7465b275f7  Calabria Pork Store     30     8.9    13
( 48 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4af0fa29f964a52060e021e3  Antonio's Trattoria    117     8.9    44
( 49 / 86 ) processed
                         ID                  Name  Likes  Rating  Tips
0  59050f51b23dfa5f6649e678  Arthur Avenue Fiasco     10     8.2     4
( 50 / 86 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4aa425bef964a5208e4520e3  Dominick's Restaurant    101     8.4    37
( 51 / 86 ) processed
                         ID    Name  Likes  Rating  Tips
0  4b5514c4f964a5207cda27e3  Enzo's     43     8.2    19
( 52 / 86 ) processed
                         ID  \
0  4af71916f964a520cf0522e3   

                                                Name  Likes  Rating  Tips  
0  Michaelangelo's Coal Fired Brick Oven Pizza Re...     39     7.8    25  
( 53 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4b5a4c8ff964a52049bb28e3  Emilia's Restaurant     32     8.1    16
( 54 / 86 ) processed
                         ID                Name  Likes  Rating  Tips
0  4c9b9e7b9c663704b90463fd  Gerbasi Ristorante     15     7.7    12
( 55 / 86 ) processed
                         ID                           Name  Likes  Rating  \
0  4aa193d5f964a520124120e3  Mario's Restaurant & Catering     54     8.0   

   Tips  
0    26  
( 56 / 86 ) processed
                         ID       Name  Likes  Rating  Tips
0  4a8e261cf964a5201c1220e3  Roberto's     65     8.1    23
( 57 / 86 ) processed
                         ID             Name  Likes  Rating  Tips
0  4c79d294278eb713f6a05580  Cafe al Mercato     10     7.9     5
( 58 / 86 ) processed
                         ID                                   Name  Likes  \
0  4cb0d382ef1b370419643e00  David Greco's Arthur Avenue Trattoria      6   

   Rating  Tips  
0     7.7     6  
( 59 / 86 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b5bc595f964a520431529e3  Pasquale Riggaletto's     33     7.5    18
( 60 / 86 ) processed
                         ID                    Name  Likes  Rating  Tips
0  53ff939c498e6b601dfa3979  San Gennaro Ristorante     17     7.1     1
( 61 / 86 ) processed
                         ID                  Name  Likes  Rating  Tips
0  55aaee4d498e3cbb70e625d6  Bella Notte Pizzeria      9     7.1     4
( 62 / 86 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b3bdd2cf964a520f57c25e3  Madison's     12     7.5     4
( 63 / 86 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b451a29f964a520ad0426e3  Beccofino     28     7.8    18
( 64 / 86 ) processed
                         ID                           Name  Likes  Rating  \
0  4b85b6b3f964a5209b6e31e3  Giovanni's Italian Restaurant     11     7.5   

   Tips  
0    10  
( 65 / 86 ) processed
                         ID                      Name  Likes  Rating  Tips
0  4c9e1ef2542b224b70a3f09f  Lucca Italian Restaurant      7     7.7     4
( 66 / 86 ) processed
                         ID                     Name  Likes  Rating  Tips
0  4bc20b8d2a89ef3b6f1af388  Villa Barone Ristorante     15     6.9    12
( 67 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  4b634812f964a520936f2ae3  Vito's Deli      6     6.8     5
( 68 / 86 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b4e3e87f964a5209de626e3  Patricia's of Tremont     48     8.2    29
( 69 / 86 ) processed
                         ID                       Name  Likes  Rating  Tips
0  4b491198f964a5208f6426e3  Rino's Italian Restaurant      6     6.6     1
( 70 / 86 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4c1d717b8b3aa59363a99a5f  Spoto's Italian Restaurant      6     6.6    11
( 71 / 86 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b4e3e87f964a5209de626e3  Patricia's of Tremont     48     8.2    29
( 72 / 86 ) processed
                         ID            Name  Likes  Rating  Tips
0  4b958fccf964a52091a934e3  Ice House Cafe     11     7.4    14
( 73 / 86 ) processed
                         ID           Name  Likes  Rating  Tips
0  4d4456d93616b60c953fe3c2  Tosca Marquee     20     6.8    14
( 74 / 86 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4c1d717b8b3aa59363a99a5f  Spoto's Italian Restaurant      6     6.6    11
( 75 / 86 ) processed
                         ID                       Name  Likes  Rating  Tips
0  4b491198f964a5208f6426e3  Rino's Italian Restaurant      6     6.6     1
( 76 / 86 ) processed
                         ID                         Name  Likes  Rating  Tips
0  4b6cb1c0f964a520d04c2ce3  Mamma Lucia's Pizza & Pasta      3     6.6    10
( 77 / 86 ) processed
                         ID        Name  Likes  Rating  Tips
0  4c9518076b35a143d5dc21dc  Fratelli's     22     8.6     6
( 78 / 86 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4bfd8d06f61dc9b669309fde  Tiny's Pizza & Pasta      6     7.1     4
( 79 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  5956be26123a195de6701c2b  Porto Salvo     10     8.4     5
( 80 / 86 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4bfd8d06f61dc9b669309fde  Tiny's Pizza & Pasta      6     7.1     4
( 81 / 86 ) processed
                         ID               Name  Likes  Rating  Tips
0  3fd66200f964a5207bf11ee3  F & J Pine Tavern    176     8.7    72
( 82 / 86 ) processed
                         ID    Name  Likes  Rating  Tips
0  4bf96ae65317a593d837017f  Enzo's     26     8.6    11
( 83 / 86 ) processed
                         ID        Name  Likes  Rating  Tips
0  4b10591af964a5205f6e23e3  Patricia's     84     8.5    39
( 84 / 86 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bd1d5fdcaff95211c6ed1f0  900 Park Restaurant     57     7.3    19
( 85 / 86 ) processed
                         ID         Name  Likes  Rating  Tips
0  4b47f069f964a5208c4426e3  Pasta Pasta      9     6.3     8
( 86 / 86 ) processed

Get details of Italian Restaurants in Brooklyn

In [43]:
# prepare neighborhood list that contains italian restaurants in Brooklyn
column_names=['Borough', 'Neighborhood', 'ID','Name','Likes','Rating','Tips']
italian_rest_stats_Brooklyn=pd.DataFrame(columns=column_names)
count=1


for row in italian_rest_Brooklyn.values.tolist():
    Borough,Neighborhood,ID,Name=row
    try:
        venue_details=get_venue_details(ID)
        print(venue_details)
        id,name,likes,rating,tips=venue_details.values.tolist()[0]
    except IndexError:
        print('No data available for id=',ID)
        # we will assign 0 value for these restaurants as they may have been 
        #recently opened or details does not exist in FourSquare Database
        id,name,likes,rating,tips=[0]*5
    print('(',count,'/',len(italian_rest_Brooklyn),')','processed')
    italian_rest_stats_Brooklyn = italian_rest_stats_Brooklyn.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name,
                                                'Likes' : likes,
                                                'Rating' : rating,
                                                'Tips' : tips
                                               }, ignore_index=True)
    count+=1
                         ID           Name  Likes  Rating  Tips
0  4b70d8dff964a52063312de3  Tuscany Grill     15     7.9     7
( 1 / 114 ) processed
                         ID                      Name  Likes  Rating  Tips
0  3fd66200f964a5205fee1ee3  Ponte Vecchio Restaurant     39     7.8    17
( 2 / 114 ) processed
                         ID      Name  Likes  Rating  Tips
0  4ad62c95f964a5208d0521e3  Zio Toto     16     7.2    34
( 3 / 114 ) processed
                         ID               Name  Likes  Rating  Tips
0  4bd075f2caff952145d3cef0  Gino's Restaurant    139     8.4    57
( 4 / 114 ) processed
                         ID                       Name  Likes  Rating  Tips
0  4a7e205ef964a52012f11fe3  Sofia Restorante Italiano     15     7.0    10
( 5 / 114 ) processed
                         ID                                    Name  Likes  \
0  4e732dff45dd41e9ccce1987  Giacomo's Wood Fired Pizza & Trattoria     23   

   Rating  Tips  
0     7.1    20  
( 6 / 114 ) processed
                         ID           Name  Likes  Rating  Tips
0  4e30a139483bb3fdc436a7e3  Villa Fiorita      3     8.0     4
( 7 / 114 ) processed
                         ID         Name  Likes  Rating  Tips
0  4ae23a80f964a5200c8c21e3  il Colosseo     30     7.6    22
( 8 / 114 ) processed
                         ID            Name  Likes  Rating  Tips
0  4e073239cc3f1ed1312dce37  Panino Rustico     45     8.7    18
( 9 / 114 ) processed
                         ID           Name  Likes  Rating  Tips
0  4c0791492e80a593eabf75f9  Papa Pasquale     12     8.2     5
( 10 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  5095a98ae4b0038a605e6f45  Cafe Lore      7     7.3     6
( 11 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  5424b085498ec9a9cdb44b70  Naked Dog    127     8.8    22
( 12 / 114 ) processed
                         ID                 Name  Likes  Rating  Tips
0  5c6ddee8de3bbf002c44d83c  Forma Pasta Factory     38     9.2    12
( 13 / 114 ) processed
                         ID               Name  Likes  Rating  Tips
0  4ad8c329f964a520731421e3  Joe's of Avenue U     35     7.9    27
( 14 / 114 ) processed
                         ID                          Name  Likes  Rating  Tips
0  5a10a9d76e465053a63ca8c7  Patrizia’s Of Sheepshead Bay     11     8.2     0
( 15 / 114 ) processed
                         ID         Name  Likes  Rating  Tips
0  4ad9fb95f964a520bb1c21e3  Il Fornetto     63     7.5    28
( 16 / 114 ) processed
                         ID             Name  Likes  Rating  Tips
0  4c9e81bb54c8a1cdea8f8e4b  Anthony's Place     28     8.2    10
( 17 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  55466c7e498e28eca31fc3e9  Next Door     17     7.3     4
( 18 / 114 ) processed
                         ID                         Name  Likes  Rating  Tips
0  4c03fc29f423a59314f7d016  Maria's Ristorante Italiano     12     6.7     4
( 19 / 114 ) processed
                         ID Name  Likes  Rating  Tips
0  52b90597498ed57b85609429  Lea    116     8.2    33
( 20 / 114 ) processed
                         ID                      Name  Likes  Rating  Tips
0  4ec7fa185c5ce271be2b2bfa  Giovanni's Brooklyn Eats    129     8.7    56
( 21 / 114 ) processed
                         ID     Name  Likes  Rating  Tips
0  4a85fd26f964a520f4ff1fe3  Provini    186     8.9    53
( 22 / 114 ) processed
                         ID   Name  Likes  Rating  Tips
0  582466b8a130da5121eb7b36  Flora     11     8.1     8
( 23 / 114 ) processed
                         ID     Name  Likes  Rating  Tips
0  4d7c069273ca54818e2c577c  Piccoli     10     7.0    13
( 24 / 114 ) processed
                         ID   Name  Likes  Rating  Tips
0  5689b018498e9a7081b667e3  Della     31     6.8     2
( 25 / 114 ) processed
                         ID        Name  Likes  Rating  Tips
0  5cdf51a01f74400039a39cdf  Dough Vale      6     8.1     5
( 26 / 114 ) processed
                         ID        Name  Likes  Rating  Tips
0  5a98aed16a59506d7a60d67c  Carmenta’s     58     9.4    21
( 27 / 114 ) processed
                         ID        Name  Likes  Rating  Tips
0  587fad59e786b27f550ce708  Nicandra's     33     8.7    10
( 28 / 114 ) processed
                         ID        Name  Likes  Rating  Tips
0  4be30f9dd27a20a1cd1f915b  River Deli    301     9.0    99
( 29 / 114 ) processed
                         ID            Name  Likes  Rating  Tips
0  3fd66200f964a520ece81ee3  Noodle Pudding    223     8.3    86
( 30 / 114 ) processed
                         ID   Name  Likes  Rating  Tips
0  5a0740a3e1f22816d11723d5  Lillo     46     9.3     9
( 31 / 114 ) processed
                         ID      Name  Likes  Rating  Tips
0  5044f749e4b0dd909d2cc123  Table 87    108     8.3    38
( 32 / 114 ) processed
                         ID   Name  Likes  Rating  Tips
0  5a0740a3e1f22816d11723d5  Lillo     46     9.3     9
( 33 / 114 ) processed
                         ID    Name  Likes  Rating  Tips
0  593329652632ec0582bd71df  Popina     46     7.9    14
( 34 / 114 ) processed
                         ID      Name  Likes  Rating  Tips
0  5044f749e4b0dd909d2cc123  Table 87    108     8.3    38
( 35 / 114 ) processed
                         ID                     Name  Likes  Rating  Tips
0  3fd66200f964a52042f11ee3  Ferdinando's Focacceria     73     8.4    34
( 36 / 114 ) processed
                         ID              Name  Likes  Rating  Tips
0  5bdcfb3e6e69af0025d9e331  The Longshoreman     20     8.3     4
( 37 / 114 ) processed
                         ID        Name  Likes  Rating  Tips
0  4be30f9dd27a20a1cd1f915b  River Deli    301     9.0    99
( 38 / 114 ) processed
                         ID     Name  Likes  Rating  Tips
0  49c4ff90f964a520da561fe3  Fragole    103     8.3    46
( 39 / 114 ) processed
                         ID                   Name  Likes  Rating  Tips
0  41abb800f964a520561e1fe3  Frankies 457 Spuntino    822     9.1   234
( 40 / 114 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4aa85f31f964a520075120e3  Vinny's of Carroll Gardens     63     7.9    40
( 41 / 114 ) processed
                         ID             Name  Likes  Rating  Tips
0  5c034c3ff5e9d7002c2a78b1  Franks Wine Bar     55     8.2     8
( 42 / 114 ) processed
                         ID              Name  Likes  Rating  Tips
0  5a56ac38dd70c54d5825002f  Panzerotti Bites     23     7.9     3
( 43 / 114 ) processed
                         ID   Name  Likes  Rating  Tips
0  5766ad56498ebf269c3737d2  Gersi     75     7.7    15
( 44 / 114 ) processed
                         ID            Name  Likes  Rating  Tips
0  4bba7fbe3db7b7131269239a  Verde on Smith    108     7.8    58
( 45 / 114 ) processed
                         ID                   Name  Likes  Rating  Tips
0  41abb800f964a520561e1fe3  Frankies 457 Spuntino    822     9.1   234
( 46 / 114 ) processed
                         ID             Name  Likes  Rating  Tips
0  5c034c3ff5e9d7002c2a78b1  Franks Wine Bar     55     8.2     8
( 47 / 114 ) processed
                         ID      Name  Likes  Rating  Tips
0  49d10b5af964a520545b1fe3  Bar Tano    143     7.9    50
( 48 / 114 ) processed
                         ID     Name  Likes  Rating  Tips
0  49c4ff90f964a520da561fe3  Fragole    103     8.3    46
( 49 / 114 ) processed
                         ID                Name  Likes  Rating  Tips
0  5a00f3538496ca58fd9e2856  Evelina Restaurant    192     9.4    34
( 50 / 114 ) processed
                         ID  Name  Likes  Rating  Tips
0  4c2d1eb17d85a593fa1452f3  Dino    228     8.4    96
( 51 / 114 ) processed
                         ID     Name  Likes  Rating  Tips
0  4afca48af964a520ab2422e3  Roman’s    295     8.7   116
( 52 / 114 ) processed
                         ID                      Name  Likes  Rating  Tips
0  57a3dfc8498e490e4b231778  LaRina Pastificio & Vino    148     9.1    20
( 53 / 114 ) processed
                         ID  Name  Likes  Rating  Tips
0  4fbabf08e4b0ffe177a56434  Aita    292     8.9    76
( 54 / 114 ) processed
                         ID      Name  Likes  Rating  Tips
0  44bcb47ef964a5209b351fe3  al di là    558     8.9   192
( 55 / 114 ) processed
                         ID          Name  Likes  Rating  Tips
0  4b2fd53cf964a520d8f024e3  Olive Garden    147     6.7    53
( 56 / 114 ) processed
                         ID                          Name  Likes  Rating  Tips
0  5a10a9d76e465053a63ca8c7  Patrizia’s Of Sheepshead Bay     11     8.2     0
( 57 / 114 ) processed
                         ID         Name  Likes  Rating  Tips
0  4ad9fb95f964a520bb1c21e3  Il Fornetto     63     7.5    28
( 58 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  55466c7e498e28eca31fc3e9  Next Door     17     7.3     4
( 59 / 114 ) processed
                         ID              Name  Likes  Rating  Tips
0  4c0183fd58dbc928d581ee6b  Papa Leone Pizza      5     7.4     7
( 60 / 114 ) processed
                         ID                         Name  Likes  Rating  Tips
0  4c03fc29f423a59314f7d016  Maria's Ristorante Italiano     12     6.7     4
( 61 / 114 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b4a6c40f964a5201e8726e3  Gargiulo's Restaurant     88     8.4    24
( 62 / 114 ) processed
                         ID               Name  Likes  Rating  Tips
0  4afac880f964a520ad1822e3  Pino's Ristorante      7     7.0     7
( 63 / 114 ) processed
                         ID                         Name  Likes  Rating  Tips
0  521a7e8a498e9a3defc15591  Casa Edesia Pizza and Grill      7     6.9     5
( 64 / 114 ) processed
                         ID          Name  Likes  Rating  Tips
0  5caa190cf427de002cc9c76f  Olive Garden      3     6.8     3
( 65 / 114 ) processed
                         ID                      Name  Likes  Rating  Tips
0  3fd66200f964a5205fee1ee3  Ponte Vecchio Restaurant     39     7.8    17
( 66 / 114 ) processed
                         ID             Name  Likes  Rating  Tips
0  4fcc08eebb3d3d2d8021af06  Tony's Pizzeria     12     7.4     7
( 67 / 114 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 56857e46498e167fff3ae53e
( 68 / 114 ) processed
                         ID                         Name  Likes  Rating  Tips
0  4c03fc29f423a59314f7d016  Maria's Ristorante Italiano     12     6.7     4
( 69 / 114 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 527eb9cd11d2e9444b2a6ca4
( 70 / 114 ) processed
                         ID                           Name  Likes  Rating  \
0  4b92c1e7f964a520eb1834e3  Frank's Pizzeria & Restaurant     26     7.2   

   Tips  
0     9  
( 71 / 114 ) processed
                         ID     Name  Likes  Rating  Tips
0  4c0ad38aa1b32d7fb4109af0  Salvi's      7     7.2     4
( 72 / 114 ) processed
                         ID                      Name  Likes  Rating  Tips
0  57a3dfc8498e490e4b231778  LaRina Pastificio & Vino    148     9.1    20
( 73 / 114 ) processed
                         ID              Name  Likes  Rating  Tips
0  572d1d41498e2483c3bed970  Da Ciro Brooklyn     15     8.0     7
( 74 / 114 ) processed
                         ID                Name  Likes  Rating  Tips
0  5a00f3538496ca58fd9e2856  Evelina Restaurant    192     9.4    34
( 75 / 114 ) processed
                         ID     Name  Likes  Rating  Tips
0  4afca48af964a520ab2422e3  Roman’s    295     8.7   116
( 76 / 114 ) processed
                         ID  Name  Likes  Rating  Tips
0  4c2d1eb17d85a593fa1452f3  Dino    228     8.4    96
( 77 / 114 ) processed
                         ID  Name  Likes  Rating  Tips
0  4fbabf08e4b0ffe177a56434  Aita    292     8.9    76
( 78 / 114 ) processed
                         ID    Name  Likes  Rating  Tips
0  4d9f5a9efc4f721e7e5a9d5f  Rucola    872     9.1   233
( 79 / 114 ) processed
                         ID    Name  Likes  Rating  Tips
0  4d9f5a9efc4f721e7e5a9d5f  Rucola    872     9.1   233
( 80 / 114 ) processed
                         ID     Name  Likes  Rating  Tips
0  59bfcdfb2079551e2b628d20  Camillo     54     8.4    12
( 81 / 114 ) processed
                         ID                                   Name  Likes  \
0  4b905bbcf964a5200f8633e3  Gino's Brick Oven Pizza and Trattoria     32   

   Rating  Tips  
0     7.3    29  
( 82 / 114 ) processed
                         ID      Name  Likes  Rating  Tips
0  4b467ca0f964a5206d2226e3  Il Posto     14     7.5     4
( 83 / 114 ) processed
                         ID Name  Likes  Rating  Tips
0  52b90597498ed57b85609429  Lea    116     8.2    33
( 84 / 114 ) processed
                         ID                Name  Likes  Rating  Tips
0  4c267153b012b71350e30893  Landi's Pork Store     32     8.5    11
( 85 / 114 ) processed
                         ID      Name  Likes  Rating  Tips
0  4b467ca0f964a5206d2226e3  Il Posto     14     7.5     4
( 86 / 114 ) processed
                         ID             Name  Likes  Rating  Tips
0  4c2bbd1b2219c9288312a548  Pastosa Ravioli      6     7.2     1
( 87 / 114 ) processed
                         ID        Name  Likes  Rating  Tips
0  5698109e498eb4e676c57b75  Dolce Vita      6     6.2     2
( 88 / 114 ) processed
                         ID           Name  Likes  Rating  Tips
0  58eac71c0319b80a65d5045b  Ammazza Caffe     71     9.1    14
( 89 / 114 ) processed
                         ID   Name  Likes  Rating  Tips
0  4ffa2f57e4b05ae525579d36  Testo    132     8.6    40
( 90 / 114 ) processed
                         ID          Name  Likes  Rating  Tips
0  4a358dfaf964a5202d9d1fe3  Il Passatore    183     8.3    65
( 91 / 114 ) processed
                         ID               Name  Likes  Rating  Tips
0  4dcabca41f6e2812677e3598  The Meatball Shop   1337     8.8   374
( 92 / 114 ) processed
                         ID    Name  Likes  Rating  Tips
0  4106ec80f964a520890b1fe3  Aurora    447     8.9   118
( 93 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  4c0b017aa1b32d7f1d6d9af0  La Palina     34     8.6    18
( 94 / 114 ) processed
                         ID              Name  Likes  Rating  Tips
0  4c8455bfe602b1f7a28cae7a  Cafe Renaissance      4     5.9     6
( 95 / 114 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4e41f5991495179c014a0cf3
( 96 / 114 ) processed
                         ID                       Name  Likes  Rating  Tips
0  525c26bc11d277827d14468f  Campania Coal Fired Pizza     75     8.8    19
( 97 / 114 ) processed
                         ID      Name  Likes  Rating  Tips
0  55ff210c498ef9c10335dc0b  Positano     39     8.0    10
( 98 / 114 ) processed
                         ID                      Name  Likes  Rating  Tips
0  3fd66200f964a5205fee1ee3  Ponte Vecchio Restaurant     39     7.8    17
( 99 / 114 ) processed
                         ID           Name  Likes  Rating  Tips
0  4b70d8dff964a52063312de3  Tuscany Grill     15     7.9     7
( 100 / 114 ) processed
                         ID    Name  Likes  Rating  Tips
0  5524916d498ee874044a6feb  Grotto     11     7.0     5
( 101 / 114 ) processed
                         ID Name  Likes  Rating  Tips
0  52b90597498ed57b85609429  Lea    116     8.2    33
( 102 / 114 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 55b17dd8498e8c4496cbb49f
( 103 / 114 ) processed
                         ID                Name  Likes  Rating  Tips
0  4c267153b012b71350e30893  Landi's Pork Store     32     8.5    11
( 104 / 114 ) processed
                         ID             Name  Likes  Rating  Tips
0  4c2bbd1b2219c9288312a548  Pastosa Ravioli      6     7.2     1
( 105 / 114 ) processed
                         ID        Name  Likes  Rating  Tips
0  5698109e498eb4e676c57b75  Dolce Vita      6     6.2     2
( 106 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  593c0d2262420b7feccc3048  Cecconi's    333     8.7    72
( 107 / 114 ) processed
                         ID            Name  Likes  Rating  Tips
0  3fd66200f964a520ece81ee3  Noodle Pudding    223     8.3    86
( 108 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  593c0d2262420b7feccc3048  Cecconi's    333     8.7    72
( 109 / 114 ) processed
                         ID            Name  Likes  Rating  Tips
0  3fd66200f964a520ece81ee3  Noodle Pudding    223     8.3    86
( 110 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  593c0d2262420b7feccc3048  Cecconi's    333     8.7    72
( 111 / 114 ) processed
                         ID            Name  Likes  Rating  Tips
0  3fd66200f964a520ece81ee3  Noodle Pudding    223     8.3    86
( 112 / 114 ) processed
                         ID              Name  Likes  Rating  Tips
0  4c8455bfe602b1f7a28cae7a  Cafe Renaissance      4     5.9     6
( 113 / 114 ) processed
                         ID       Name  Likes  Rating  Tips
0  42508380f964a520c1201fe3  Michael's     57     8.1    11
( 114 / 114 ) processed

Get details of Italian Restaurants in Manhattan

In [44]:
# prepare neighborhood list that contains italian restaurants in Manhattan
column_names=['Borough', 'Neighborhood', 'ID','Name','Likes','Rating','Tips']
italian_rest_stats_Manhattan=pd.DataFrame(columns=column_names)
count=1

for row in italian_rest_Manhattan.values.tolist():
    Borough,Neighborhood,ID,Name=row
    try:
        venue_details=get_venue_details(ID)
        print(venue_details)
        id,name,likes,rating,tips=venue_details.values.tolist()[0]
    except IndexError:
        print('No data available for id=',ID)
        # we will assign 0 value for these restaurants as they may have been 
        #recently opened or details does not exist in FourSquare Database
        id,name,likes,rating,tips=[0]*5
    print('(',count,'/',len(italian_rest_Manhattan),')','processed')
    italian_rest_stats_Manhattan = italian_rest_stats_Manhattan.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name,
                                                'Likes' : likes,
                                                'Rating' : rating,
                                                'Tips' : tips
                                               }, ignore_index=True)
    count+=1
                         ID               Name  Likes  Rating  Tips
0  4d21107c6e8c37042b58ff9f  Saggio Restaurant    119     8.7    62
( 1 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  56d8e01d498ef1500ae7fbfe  Fumo    102     9.0    22
( 2 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  558c6d42498eab8b9ee8da37  Bono Trattoria    101     8.7    19
( 3 / 138 ) processed
                         ID                 Name  Likes  Rating  Tips
0  457f1183f964a5204b3f1fe3  Pisticci Ristorante    403     9.1   146
( 4 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  4c956003f7cfa1cd2e2ebd15  Bettolona     91     8.0    40
( 5 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  56d8e01d498ef1500ae7fbfe  Fumo    102     9.0    22
( 6 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  3fd66200f964a52006e91ee3  Max SoHa    112     7.8    60
( 7 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  56d8e01d498ef1500ae7fbfe  Fumo    102     9.0    22
( 8 / 138 ) processed
                         ID   Name  Likes  Rating  Tips
0  3fd66200f964a5207de81ee3  Rao's     78     8.7    33
( 9 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  51800134e4b03b4e898c8f16  Armonie     15     8.5    10
( 10 / 138 ) processed
                         ID                 Name  Likes  Rating  Tips
0  53effc79498eddd22101127d  Nocciola Ristorante     25     7.7     9
( 11 / 138 ) processed
                         ID           Name  Likes  Rating  Tips
0  4a22d7f9f964a520977d1fe3  Sant Ambroeus    317     8.7    87
( 12 / 138 ) processed
                         ID                          Name  Likes  Rating  Tips
0  4a6133a6f964a52015c21fe3  Caffe Buon Gusto - Manhattan    109     8.9    38
( 13 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  4ab972d6f964a520697f20e3  Parma Restaurant     15     8.1    14
( 14 / 138 ) processed
                         ID Name  Likes  Rating  Tips
0  42699000f964a52049211fe3  Uva    802     9.1   231
( 15 / 138 ) processed
                         ID                          Name  Likes  Rating  Tips
0  562c1df4498e2c64fb4a9faa  San Matteo Pizzeria e Cucina    105     8.7    25
( 16 / 138 ) processed
                         ID                   Name  Likes  Rating  Tips
0  56bce4c5498ef768f74f4e6c  Come Prima Ristorante     15     8.6     4
( 17 / 138 ) processed
                         ID          Name  Likes  Rating  Tips
0  4b23ee1ef964a520255d24e3  Caffe Grazie     68     8.1    26
( 18 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  4e4078922271a89dd083d07e  Felice 83    152     8.7    39
( 19 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  4b623700f964a520a83c2ae3  Nica Trattoria     29     8.4    19
( 20 / 138 ) processed
                         ID                      Name  Likes  Rating  Tips
0  4b651459f964a52030e32ae3  Italianissimo Ristorante     31     8.7    14
( 21 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  4b981d9af964a520802d35e3  Elio's    120     9.1    49
( 22 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  504bb0fae4b0d1cf33ca07d0  83 1/2     43     8.3    22
( 23 / 138 ) processed
                         ID                          Name  Likes  Rating  Tips
0  562c1df4498e2c64fb4a9faa  San Matteo Pizzeria e Cucina    105     8.7    25
( 24 / 138 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b775e32f964a520a6952ee3  Campagnola Restaurant     32     8.1    37
( 25 / 138 ) processed
                         ID Name  Likes  Rating  Tips
0  42699000f964a52049211fe3  Uva    802     9.1   231
( 26 / 138 ) processed
                         ID                          Name  Likes  Rating  Tips
0  4a6133a6f964a52015c21fe3  Caffe Buon Gusto - Manhattan    109     8.9    38
( 27 / 138 ) processed
                         ID               Name  Likes  Rating  Tips
0  51c9e3f9498e2cb9c31d19ff  The Meatball Shop    656     8.4   178
( 28 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  3fd66200f964a52075e91ee3  Bella Blu     62     8.0    24
( 29 / 138 ) processed
                         ID                   Name  Likes  Rating  Tips
0  56bce4c5498ef768f74f4e6c  Come Prima Ristorante     15     8.6     4
( 30 / 138 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b775e32f964a520a6952ee3  Campagnola Restaurant     32     8.1    37
( 31 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  42489a80f964a5208a201fe3  Celeste    240     8.5   127
( 32 / 138 ) processed
                         ID                Name  Likes  Rating  Tips
0  56afed04498e39e35747adf2  Pizzeria Sirenetta    154     8.8    35
( 33 / 138 ) processed
                         ID           Name  Likes  Rating  Tips
0  4d68839467a8f04df7ee01be  Osteria Cotta    435     8.6   170
( 34 / 138 ) processed
                         ID                          Name  Likes  Rating  Tips
0  4a7778a1f964a5209be41fe3  Carmine's Italian Restaurant    389     8.2   130
( 35 / 138 ) processed
                         ID         Name  Likes  Rating  Tips
0  5282b4bf11d2b180cc775713  Cibo E Vino     80     7.8    12
( 36 / 138 ) processed
                         ID           Name  Likes  Rating  Tips
0  459395b7f964a52047401fe3  Cafe Fiorello    252     8.2   140
( 37 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  4b69b408f964a520c5ae2be3  Noi Due     39     8.0    26
( 38 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  548a64ae498e972164140a84  Parm    371     8.6    73
( 39 / 138 ) processed
                         ID               Name  Likes  Rating  Tips
0  54961b98498eccc96c4a93d7  Masseria dei Vini    108     8.5    29
( 40 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  4ee6366b77c8e89319c7e4b8  Joanne Trattoria    132     7.7    64
( 41 / 138 ) processed
                         ID                  Name  Likes  Rating  Tips
0  5633bec0498e430fc8ba8f3c  La Vela Dining & Bar     23     8.2     6
( 42 / 138 ) processed
                         ID                Name  Likes  Rating  Tips
0  4dcae1b18877502200c95822  Sergimmo Salumeria    328     8.8   129
( 43 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  506e48ffe4b078ebe1c30a29  Bocca Di Bacco    107     8.1    38
( 44 / 138 ) processed
                         ID   Name  Likes  Rating  Tips
0  49d5651df964a520915c1fe3  Nizza    196     8.0   118
( 45 / 138 ) processed
                         ID               Name  Likes  Rating  Tips
0  511d6006e4b0a486ec088c89  The Meatball Shop   1003     8.8   192
( 46 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  4533d338f964a5208f3b1fe3  Del Posto    655     8.6   281
( 47 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  504b2a9ee4b006c435a465d3  Carbone    704     9.2   233
( 48 / 138 ) processed
                         ID                             Name  Likes  Rating  \
0  5ab53749446ea6289e41b0e6  Coco Pazzo Kitchen & Restaurant     57     8.9   

   Tips  
0    11  
( 49 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  556f4ef2498ee60139b28c72  Dante NYC    494     9.2   134
( 50 / 138 ) processed
                         ID                        Name  Likes  Rating  Tips
0  56d92e05498e6c54b6325b19  San Carlo Osteria Piemonte    104     9.1    41
( 51 / 138 ) processed
                         ID          Name  Likes  Rating  Tips
0  51278a09e4b0b624edbc914c  Charlie Bird    731     8.8   186
( 52 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  543075b3498e283e38ad9dec  Cotenna    883     9.0   233
( 53 / 138 ) processed
                         ID   Name  Likes  Rating  Tips
0  3fd66200f964a5202de71ee3  Palma    483     8.9   127
( 54 / 138 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4cc6222106c25481d7a4a047  Rubirosa Ristorante   2491     9.2   825
( 55 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  4d9f8d97a428a1cdd92acb04  Parm   1129     8.8   494
( 56 / 138 ) processed
                         ID         Name  Likes  Rating  Tips
0  534c7a27498efe3d035cbbe9  Baker & Co.    399     8.8    98
( 57 / 138 ) processed
                         ID   Name  Likes  Rating  Tips
0  54459a46498ecf8ec204cc61  Vic's    467     8.9   108
( 58 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  40f1d480f964a520680a1fe3  Hearth    582     8.7   208
( 59 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  4575b847f964a520a13e1fe3  Lavagna    143     8.6    76
( 60 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  56cf3493cd106ae44d0c76a8  Speedy Romeo LES    302     8.8    81
( 61 / 138 ) processed
                         ID               Name  Likes  Rating  Tips
0  4d49d00ef53c8cfa78561c47  Gaia Italian Cafe    266     9.1   132
( 62 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  42893400f964a5206c231fe3  Il Posto Accanto    118     8.8    50
( 63 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  3fd66200f964a5209de41ee3  Supper    776     8.6   281
( 64 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  4575b847f964a520a13e1fe3  Lavagna    143     8.6    76
( 65 / 138 ) processed
                         ID        Name  Likes  Rating  Tips
0  5070d27ae4b0513ffd4ddfe7  Trapizzino     81     8.5    17
( 66 / 138 ) processed
                         ID           Name  Likes  Rating  Tips
0  4a149749f964a52055781fe3  Locanda Verde   1438     8.8   502
( 67 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  4ad68c35f964a520c20721e3  Pepolino    164     8.8   114
( 68 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  437bc800f964a520a52a1fe3  Scalini Fedeli     61     8.6    28
( 69 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  54ab15df498ee7d7723bca15  Adoro Lei    107     8.3    20
( 70 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  4c7d4f1b8da18cfa1afc9ece  Osteria Morini    747     8.7   292
( 71 / 138 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4cc6222106c25481d7a4a047  Rubirosa Ristorante   2491     9.2   825
( 72 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  49e4f405f964a52078631fe3  Emporio    510     8.9   217
( 73 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  4d9f8d97a428a1cdd92acb04  Parm   1129     8.8   494
( 74 / 138 ) processed
                         ID                        Name  Likes  Rating  Tips
0  56d92e05498e6c54b6325b19  San Carlo Osteria Piemonte    104     9.1    41
( 75 / 138 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4cc6222106c25481d7a4a047  Rubirosa Ristorante   2491     9.2   825
( 76 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  4ad68c35f964a520c20721e3  Pepolino    164     8.8   114
( 77 / 138 ) processed
                         ID                             Name  Likes  Rating  \
0  5ab53749446ea6289e41b0e6  Coco Pazzo Kitchen & Restaurant     57     8.9   

   Tips  
0    11  
( 78 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  4d9f8d97a428a1cdd92acb04  Parm   1129     8.8   494
( 79 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  49e4f405f964a52078631fe3  Emporio    510     8.9   217
( 80 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  504b2a9ee4b006c435a465d3  Carbone    704     9.2   233
( 81 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  4a27289cf964a52062911fe3  L'Artusi   1168     9.3   368
( 82 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  49bd2326f964a5204d541fe3  I Sodi    253     9.0    95
( 83 / 138 ) processed
                         ID                   Name  Likes  Rating  Tips
0  5c27b46a67a9fe002ce6b3ca  Fiaschetteria Pistoia     33     8.7    10
( 84 / 138 ) processed
                         ID        Name  Likes  Rating  Tips
0  543c7c63498e0a3393da47a2  Via Carota    607     9.2   155
( 85 / 138 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4a552b26f964a520c4b31fe3  Malatesta Trattoria    440     8.7   199
( 86 / 138 ) processed
                         ID                        Name  Likes  Rating  Tips
0  449e952ef964a520bc341fe3  Sant Ambroeus West Village    217     8.6    71
( 87 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  4d327cc72e56236a18991db4  Malaparte    270     8.9    78
( 88 / 138 ) processed
                         ID         Name  Likes  Rating  Tips
0  534c7a27498efe3d035cbbe9  Baker & Co.    399     8.8    98
( 89 / 138 ) processed
                         ID   Name  Likes  Rating  Tips
0  3fd66200f964a5202de71ee3  Palma    483     8.9   127
( 90 / 138 ) processed
                         ID               Name  Likes  Rating  Tips
0  4eb5e354b8f786e2756cb884  The Meatball Shop   1072     9.0   277
( 91 / 138 ) processed
                         ID         Name  Likes  Rating  Tips
0  5962a53dc824ae6362e9e625  Osteria 106     38     8.4     9
( 92 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  5c5b43f18194fc002c18f606  Fumo     13     8.6     5
( 93 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  5c5b43f18194fc002c18f606  Fumo     13     8.6     5
( 94 / 138 ) processed
                         ID                 Name  Likes  Rating  Tips
0  457f1183f964a5204b3f1fe3  Pisticci Ristorante    403     9.1   146
( 95 / 138 ) processed
                         ID         Name  Likes  Rating  Tips
0  4d573d8aa747b60cc83b332b  Lido Harlem    339     8.6   134
( 96 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  3fd66200f964a52006e91ee3  Max SoHa    112     7.8    60
( 97 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  4c956003f7cfa1cd2e2ebd15  Bettolona     91     8.0    40
( 98 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  4afb2990f964a520a91b22e3  Maialino   1453     8.8   464
( 99 / 138 ) processed
                         ID                    Name  Likes  Rating  Tips
0  4b741ab4f964a5202cc82de3  Novità Cucina Creativa    110     8.7    38
( 100 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  57c772d1498e6cb2f6531cdf  Follia    110     8.4    20
( 101 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  5cc3adaa838e59002cb4629d  Rezdôra     70     8.4    19
( 102 / 138 ) processed
                         ID  Name  Likes  Rating  Tips
0  556cb8c6498e751e51fbcf41  Parm    246     8.0    73
( 103 / 138 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b4f88adf964a5204c0a27e3  Gigino at Wagner Park    119     8.5    61
( 104 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  4bb54fe02f70c9b6c6188430  Giardino D'oro     35     8.2    18
( 105 / 138 ) processed
                         ID                       Name  Likes  Rating  Tips
0  4a4560a7f964a5201aa81fe3  Harry's Italian Pizza Bar    317     7.8   141
( 106 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  4aad53a2f964a520b75f20e3  Lex Restaurant     17     8.5    11
( 107 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  4bb4d86886a8d13a83f8de7f  Sfoglia     90     8.1    54
( 108 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  4b981d9af964a520802d35e3  Elio's    120     9.1    49
( 109 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  3fd66200f964a520d0e41ee3  Lil' Frankie's    892     8.8   258
( 110 / 138 ) processed
                         ID               Name  Likes  Rating  Tips
0  4d49d00ef53c8cfa78561c47  Gaia Italian Cafe    266     9.1   132
( 111 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  42893400f964a5206c231fe3  Il Posto Accanto    118     8.8    50
( 112 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  3fd66200f964a5204de41ee3  Frank Restaurant    422     8.9   162
( 113 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  3fd66200f964a5201ce61ee3  Il Buco    540     8.9   146
( 114 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  56cf3493cd106ae44d0c76a8  Speedy Romeo LES    302     8.8    81
( 115 / 138 ) processed
                         ID            Name  Likes  Rating  Tips
0  437bc800f964a520a52a1fe3  Scalini Fedeli     61     8.6    28
( 116 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  4ad68c35f964a520c20721e3  Pepolino    164     8.8   114
( 117 / 138 ) processed
                         ID           Name  Likes  Rating  Tips
0  4a149749f964a52055781fe3  Locanda Verde   1438     8.8   502
( 118 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  55e63b89498e3ed62f75cff3  L'Amico    390     8.4    77
( 119 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  55a03533498ec7e74011d0af  La Pecora Bianca    432     8.5    77
( 120 / 138 ) processed
                         ID     Name  Likes  Rating  Tips
0  4b566000f964a520c00d28e3  Felidia    184     8.8    50
( 121 / 138 ) processed
                         ID          Name  Likes  Rating  Tips
0  4af610e2f964a520bf0022e3  Scalinatella    104     8.6    32
( 122 / 138 ) processed
                         ID   Name  Likes  Rating  Tips
0  54b1c94a498e09d5326f68fe  amata     30     8.6     9
( 123 / 138 ) processed
                         ID           Name  Likes  Rating  Tips
0  4a8f1d7ef964a520041420e3  Isle of Capri     45     8.2    30
( 124 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  4f90a618e4b0ead1972c3da6  Tony's Di Napoli    251     8.3    64
( 125 / 138 ) processed
                         ID              Name  Likes  Rating  Tips
0  59dfff99419a9e7fcc5b5fa2  La Pecora Bianca     94     8.2    15
( 126 / 138 ) processed
                         ID       Name  Likes  Rating  Tips
0  5b1db44d0d8a0f002c17fd87  Angeletto      9     7.7     1
( 127 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  4b2042fff964a5208f2f24e3  Pietro's     40     8.1    19
( 128 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  4b2042fff964a5208f2f24e3  Pietro's     40     8.1    19
( 129 / 138 ) processed
                         ID                   Name  Likes  Rating  Tips
0  589a66b251666a5ffadde9ea  Fiaschetteria Pistoia     81     8.4    20
( 130 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  40f1d480f964a520680a1fe3  Hearth    582     8.7   208
( 131 / 138 ) processed
                         ID    Name  Likes  Rating  Tips
0  49c6a988f964a5206e571fe3  Gnocco    199     8.1    93
( 132 / 138 ) processed
                         ID                    Name  Likes  Rating  Tips
0  4b741ab4f964a5202cc82de3  Novità Cucina Creativa    110     8.7    38
( 133 / 138 ) processed
                         ID        Name  Likes  Rating  Tips
0  4a8c84daf964a520530e20e3  da Umberto     88     9.0    38
( 134 / 138 ) processed
                         ID      Name  Likes  Rating  Tips
0  4afb2990f964a520a91b22e3  Maialino   1453     8.8   464
( 135 / 138 ) processed
                         ID                Name  Likes  Rating  Tips
0  4dcae1b18877502200c95822  Sergimmo Salumeria    328     8.8   129
( 136 / 138 ) processed
                         ID                  Name  Likes  Rating  Tips
0  5633bec0498e430fc8ba8f3c  La Vela Dining & Bar     23     8.2     6
( 137 / 138 ) processed
                         ID        Name  Likes  Rating  Tips
0  4d0122e21ebe6dcb3d918b91  Casa Nonna    201     8.0    79
( 138 / 138 ) processed

Get details of Italian Restaurants in Queens

In [79]:
# prepare neighborhood list that contains italian restaurants in Queens
column_names=['Borough', 'Neighborhood', 'ID','Name','Likes','Rating','Tips']
italian_rest_stats_Queens=pd.DataFrame(columns=column_names)
count=1

for row in italian_rest_Queens.values.tolist():
    Borough,Neighborhood,ID,Name=row
    try:
        venue_details=get_venue_details(ID)
        print(venue_details)
        id,name,likes,rating,tips=venue_details.values.tolist()[0]
    except IndexError:
        print('No data available for id=',ID)
        # we will assign 0 value for these restaurants as they may have been 
        #recently opened or details does not exist in FourSquare Database
        id,name,likes,rating,tips=[0]*5
    print('(',count,'/',len(italian_rest_Queens),')','processed')
    italian_rest_stats_Queens = italian_rest_stats_Queens.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name,
                                                'Likes' : likes,
                                                'Rating' : rating,
                                                'Tips' : tips
                                               }, ignore_index=True)
    count+=1
                         ID                          Name  Likes  Rating  Tips
0  5010b169e4b05edd9983ec7d  Antika Restaurant & Pizzeria     72     8.2    31
( 1 / 106 ) processed
                         ID        Name  Likes  Rating  Tips
0  4ebf0e380aaf6450ba608920  Via Trenta     57     7.7    28
( 2 / 106 ) processed
                         ID             Name  Likes  Rating  Tips
0  53a60a88498ef405d8a78217  VITE vinosteria    106     8.8    30
( 3 / 106 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bc11e07920eb713d6491a2c  Donato's Restaurant     23     7.2     9
( 4 / 106 ) processed
                         ID           Name  Likes  Rating  Tips
0  4a82d6adf964a5206ff91fe3  Uncle Peter's     42     8.9    11
( 5 / 106 ) processed
                         ID              Name  Likes  Rating  Tips
0  4bae3bd0f964a52009963be3  Brothers Ravioli     10     8.2     2
( 6 / 106 ) processed
                         ID                Name  Likes  Rating  Tips
0  4bafdb5df964a52086263ce3  Prima Pasta & Cafe     35     7.5    17
( 7 / 106 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4e6409451495676d566f10b5  Bruno Ristorante Italianio     29     8.7     7
( 8 / 106 ) processed
                         ID                Name  Likes  Rating  Tips
0  4ba148f5f964a5201da937e3  Roma View Catering     16     7.0     3
( 9 / 106 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b808501f964a5207b7930e3  Park Side    187     8.7    78
( 10 / 106 ) processed
                         ID                     Name  Likes  Rating  Tips
0  4ea2fc90cc2102b34d3d8dc7  Il Triangolo Ristorante     35     8.8    26
( 11 / 106 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4e4cdc81bd413c4cc66cc144
( 12 / 106 ) processed
                         ID          Name  Likes  Rating  Tips
0  4c8d2ce6f87e224bfb6d3b05  Tuscan Hills     46     8.0    15
( 13 / 106 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4ba0203af964a520105c37e3  Portofino Ristorante     58     7.6    38
( 14 / 106 ) processed
                         ID                          Name  Likes  Rating  Tips
0  4c93eb6a72dd224be41d9591  Paul Michael Brick Oven Cafe     16     7.1    14
( 15 / 106 ) processed
                         ID                          Name  Likes  Rating  Tips
0  4c93eb6a72dd224be41d9591  Paul Michael Brick Oven Cafe     16     7.1    14
( 16 / 106 ) processed
                         ID     Name  Likes  Rating  Tips
0  5aa41faf178a2a08410ce198  Beebe’s     53     8.5    11
( 17 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  53ed8f36498ea1eca81563c1  Il Falco     38     8.1    15
( 18 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  555d29f7498eb6112f44ecac  SoleLuna    119     9.1    26
( 19 / 106 ) processed
                         ID                Name  Likes  Rating  Tips
0  4ce1741194c3b60c5dc776ea  Dazie's Restaurant      8     6.0     8
( 20 / 106 ) processed
                         ID   Name  Likes  Rating  Tips
0  5480b6d4498e6e352f7a8d3e  Cotto     29     5.9     9
( 21 / 106 ) processed
                         ID                   Name  Likes  Rating  Tips
0  5c6183b006fb60002ca6572b  Patrizia's of Maspeth      6     7.4     2
( 22 / 106 ) processed
                         ID                        Name  Likes  Rating  Tips
0  513d152ee4b0d54ade774b14  Forno Pizzeria & Trattoria     20     7.4    12
( 23 / 106 ) processed
                         ID              Name  Likes  Rating  Tips
0  4b89b361f964a520074c32e3  Joe's Restaurant     33     8.0    15
( 24 / 106 ) processed
                         ID              Name  Likes  Rating  Tips
0  4c1e7c9e63750f47d5d3b967  Antica Trattoria     19     8.0    14
( 25 / 106 ) processed
                         ID               Name  Likes  Rating  Tips
0  4dcf12c8fa7664b7c6b91801  Trattoria Cerbone      4     7.0     6
( 26 / 106 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 53bcb8c6498e5cf43e9785f7
( 27 / 106 ) processed
                         ID                            Name  Likes  Rating  \
0  4c50f9ae9d642d7f357fc6dc  Avellino Ristorante & Pizzeria     28     8.5   

   Tips  
0    13  
( 28 / 106 ) processed
                         ID                          Name  Likes  Rating  Tips
0  4cb21cebdb32f04db2a7cd4d  Aldo's Pizzeria & Restaurant     22     7.2    12
( 29 / 106 ) processed
                         ID       Name  Likes  Rating  Tips
0  4ac7e812f964a5207fba20e3  Don Peppe    103     8.1    48
( 30 / 106 ) processed
                         ID                            Name  Likes  Rating  \
0  4ebc34954690a29fd6be2e82  Nonna's Pizzeria and Trattoria      8     7.1   

   Tips  
0     4  
( 31 / 106 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4ba3d448f964a5200c6438e3  Il Nocello Ristorante      7     7.0     5
( 32 / 106 ) processed
                         ID              Name  Likes  Rating  Tips
0  56071182498e48b25409f3b5  Liola Ristorante      6     6.9     4
( 33 / 106 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4bc1f7b6461576b025907c32  Verdi's of Whitestone     12     5.8     4
( 34 / 106 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4d290280342d6dcb91a7feca  Villagio Ristorante     10     5.8     4
( 35 / 106 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bb7ca5b1261d13a83e2e798  Papazzio Restaurant     22     7.9    13
( 36 / 106 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4d4e0113869cf04dd10ce4ae  Trattoria Thirty Five     33     7.1    29
( 37 / 106 ) processed
                         ID               Name  Likes  Rating  Tips
0  4b89d531f964a520f54f32e3  Jimmy's Trattoria     11     7.1     7
( 38 / 106 ) processed
                         ID                             Name  Likes  Rating  \
0  4b96ab2af964a520bfdc34e3  Durso's Pasta & Ravioli Company     27     8.1   

   Tips  
0    15  
( 39 / 106 ) processed
                         ID         Name  Likes  Rating  Tips
0  4c0aeaa1340720a1fd5b8793  Primo Amore      6     5.9     2
( 40 / 106 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c0bec6a6071a59315fae132
( 41 / 106 ) processed
                         ID          Name  Likes  Rating  Tips
0  4bc8f64c0687ef3bda0bd9cc  Aunt Bella's      9     7.9     3
( 42 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  4bae85bef964a52073bc3be3  Il Bacco     63     7.6    20
( 43 / 106 ) processed
                         ID         Name  Likes  Rating  Tips
0  528ffa0b11d2ea463d2cd25c  Ponte Mollo      9     8.0     3
( 44 / 106 ) processed
                         ID             Name  Likes  Rating  Tips
0  4bc0cad874a9a59398afd0f6  Il Sapore Pizza      6     7.3     4
( 45 / 106 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4c1a9ed0b4e62d7fa119d893  La Grotta di Marcello      7     6.6     3
( 46 / 106 ) processed
                         ID        Name  Likes  Rating  Tips
0  4bd23c50caff95215f71d2f0  Il Toscano     18     6.2    12
( 47 / 106 ) processed
                         ID          Name  Likes  Rating  Tips
0  4bc8f64c0687ef3bda0bd9cc  Aunt Bella's      9     7.9     3
( 48 / 106 ) processed
                         ID             Name  Likes  Rating  Tips
0  4bc0cad874a9a59398afd0f6  Il Sapore Pizza      6     7.3     4
( 49 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  4bae85bef964a52073bc3be3  Il Bacco     63     7.6    20
( 50 / 106 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4c1a9ed0b4e62d7fa119d893  La Grotta di Marcello      7     6.6     3
( 51 / 106 ) processed
                         ID        Name  Likes  Rating  Tips
0  4bd23c50caff95215f71d2f0  Il Toscano     18     6.2    12
( 52 / 106 ) processed
                         ID                      Name  Likes  Rating  Tips
0  4c450fae74ffc928328676cc  Luigi's Restaurant & Bar     79     8.4    34
( 53 / 106 ) processed
                         ID             Name  Likes  Rating  Tips
0  4cf009ae7b94370446c43653  Trattoria Lucia     17     6.5     8
( 54 / 106 ) processed
                         ID                          Name  Likes  Rating  Tips
0  4d0ab4386aa05481d5f5e5aa  Arturo's Ristorante Italiano      6     5.9     1
( 55 / 106 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4c1e3a9f8b3aa593b4b49b5f  L'italiana Trattoria      7     7.5    14
( 56 / 106 ) processed
                         ID                              Name  Likes  Rating  \
0  4b9c519ef964a520065f36e3  Villa Rustica Ristorante & Pizza     13     7.4   

   Tips  
0    13  
( 57 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  5c087e308264440039684a37  Ninos Aq      9     8.2     5
( 58 / 106 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4afc64a8f964a520382222e3  Trattoria L'incontro    123     8.8    61
( 59 / 106 ) processed
                         ID                              Name  Likes  Rating  \
0  4b494398f964a520d96b26e3  Porto Bello Pizza and Restaurant     59     8.2   

   Tips  
0    21  
( 60 / 106 ) processed
                         ID     Name  Likes  Rating  Tips
0  53a618d4498ea7107dabe020  Via Vai     32     8.2    10
( 61 / 106 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4b26d60cf964a520b58124e3  Ornella Trattoria Italiana     42     7.9    72
( 62 / 106 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4e22342252b1f82ffba73c1c  due ponti ristorante      7     6.8     9
( 63 / 106 ) processed
                         ID                    Name  Likes  Rating  Tips
0  4ce9b1fcfe90a35d7bf2490e  The Clinton Restaurant     16     7.0     6
( 64 / 106 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4ba3d448f964a5200c6438e3  Il Nocello Ristorante      7     7.0     5
( 65 / 106 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4d290280342d6dcb91a7feca  Villagio Ristorante     10     5.8     4
( 66 / 106 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4db21fe4fa8c14a4d2cd2d89
( 67 / 106 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c02bbfdf56c2d7fc7dd1b66
( 68 / 106 ) processed
                         ID           Name  Likes  Rating  Tips
0  4bd0c0cecaff9521b878cff0  Plum Tomatoes      5     6.2    16
( 69 / 106 ) processed
                         ID                      Name  Likes  Rating  Tips
0  4c450fae74ffc928328676cc  Luigi's Restaurant & Bar     79     8.4    34
( 70 / 106 ) processed
                         ID                Name  Likes  Rating  Tips
0  4b368ed8f964a520f53725e3  Acquista Trattoria     34     8.0    28
( 71 / 106 ) processed
                         ID       Name  Likes  Rating  Tips
0  5b53e651005ac10039e41a58  Botte Bar      9     7.9    11
( 72 / 106 ) processed
                         ID             Name  Likes  Rating  Tips
0  53a60a88498ef405d8a78217  VITE vinosteria    106     8.8    30
( 73 / 106 ) processed
                         ID     Name  Likes  Rating  Tips
0  5aa41faf178a2a08410ce198  Beebe’s     53     8.5    11
( 74 / 106 ) processed
                         ID                        Name  Likes  Rating  Tips
0  49c68eaaf964a5205c571fe3  Vesta Trattoria & Wine Bar    185     9.0   106
( 75 / 106 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4a86124ff964a5204e0020e3  Napoli Pizza & Pasta     48     7.7    34
( 76 / 106 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4e6409451495676d566f10b5  Bruno Ristorante Italianio     29     8.7     7
( 77 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  4e4e429ebd4101d0d7a63105  Matteo's     29     6.8    10
( 78 / 106 ) processed
                         ID                            Name  Likes  Rating  \
0  4c50f9ae9d642d7f357fc6dc  Avellino Ristorante & Pizzeria     28     8.5   

   Tips  
0    13  
( 79 / 106 ) processed
                         ID                     Name  Likes  Rating  Tips
0  4ea2fc90cc2102b34d3d8dc7  Il Triangolo Ristorante     35     8.8    26
( 80 / 106 ) processed
                         ID           Name  Likes  Rating  Tips
0  4bd0c0cecaff9521b878cff0  Plum Tomatoes      5     6.2    16
( 81 / 106 ) processed
                         ID           Name  Likes  Rating  Tips
0  4bd0c0cecaff9521b878cff0  Plum Tomatoes      5     6.2    16
( 82 / 106 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bdcdd7c462b2d7fd0b7113c  Cara Mia Restaurant     29     8.6    11
( 83 / 106 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c38aa2a0a71c9b6d10841c9
( 84 / 106 ) processed
                         ID          Name  Likes  Rating  Tips
0  4c8d2ce6f87e224bfb6d3b05  Tuscan Hills     46     8.0    15
( 85 / 106 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4ba0203af964a520105c37e3  Portofino Ristorante     58     7.6    38
( 86 / 106 ) processed
                         ID                Name  Likes  Rating  Tips
0  4b368ed8f964a520f53725e3  Acquista Trattoria     34     8.0    28
( 87 / 106 ) processed
                         ID                               Name  Likes  Rating  \
0  4bbb76328a0d95216761d930  Francesco's Pizzeria & Restaurant      6     5.8   

   Tips  
0     4  
( 88 / 106 ) processed
                         ID                              Name  Likes  Rating  \
0  4b494398f964a520d96b26e3  Porto Bello Pizza and Restaurant     59     8.2   

   Tips  
0    21  
( 89 / 106 ) processed
                         ID               Name  Likes  Rating  Tips
0  4f048814f9ab88b0c268dda3  Antonio's Kitchen     15     6.9    12
( 90 / 106 ) processed
                         ID             Name  Likes  Rating  Tips
0  4af4e590f964a52049f721e3  Forno Siciliano     12     7.0    11
( 91 / 106 ) processed
                         ID                  Name  Likes  Rating  Tips
0  463220f3f964a520fb451fe3  Manetta's Ristorante     74     8.5    35
( 92 / 106 ) processed
                         ID       Name  Likes  Rating  Tips
0  4a1a3f6df964a5208b7a1fe3  Bella Via     64     8.1    36
( 93 / 106 ) processed
                         ID                Name  Likes  Rating  Tips
0  49f5bf5ef964a520b46b1fe3  Manducatis Rustica     70     8.3    38
( 94 / 106 ) processed
                         ID     Name  Likes  Rating  Tips
0  556fb3b4498e61f524e70951  Maiella     92     8.8    28
( 95 / 106 ) processed
                         ID        Name  Likes  Rating  Tips
0  4f74ff83e4b09b101271b89b  Manducatis     33     7.8     9
( 96 / 106 ) processed
                         ID        Name  Likes  Rating  Tips
0  540a3547498e9b339b6431ae  Le Fanfare    112     8.2    33
( 97 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  53ed8f36498ea1eca81563c1  Il Falco     38     8.1    15
( 98 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  555d29f7498eb6112f44ecac  SoleLuna    119     9.1    26
( 99 / 106 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4bc11e07920eb713d6491a2c  Donato's Restaurant     23     7.2     9
( 100 / 106 ) processed
                         ID  \
0  4c0d4e92b1b676b07c63e086   

                                                Name  Likes  Rating  Tips  
0  Rocco's Italian Sauage / Cheese Steaks / Break...     21     7.3    15  
( 101 / 106 ) processed
                         ID          Name  Likes  Rating  Tips
0  53989edf498e85ce86d65ea2  Villa Erasmo     16     8.2     4
( 102 / 106 ) processed
                         ID              Name  Likes  Rating  Tips
0  56071182498e48b25409f3b5  Liola Ristorante      6     6.9     4
( 103 / 106 ) processed
                         ID     Name  Likes  Rating  Tips
0  5aa41faf178a2a08410ce198  Beebe’s     53     8.5    11
( 104 / 106 ) processed
                         ID      Name  Likes  Rating  Tips
0  53ed8f36498ea1eca81563c1  Il Falco     38     8.1    15
( 105 / 106 ) processed
                         ID                       Name  Likes  Rating  Tips
0  57a13096498e42182b7df641  Oro Restaurant and Lounge      8     6.5     4
( 106 / 106 ) processed

Get details of Italian Restaurants in Staten Island

In [82]:
# prepare neighborhood list that contains italian restaurants in Staten Island
column_names=['Borough', 'Neighborhood', 'ID','Name','Likes','Rating','Tips']
italian_rest_stats_Staten_Island=pd.DataFrame(columns=column_names)
count=1
for row in italian_rest_Staten_Island.values.tolist():
    Borough,Neighborhood,ID,Name=row
    try:
        venue_details=get_venue_details(ID)
        print(venue_details)
        id,name,likes,rating,tips=venue_details.values.tolist()[0]
    except IndexError:
        print('No data available for id=',ID)
        # we will assign 0 value for these restaurants as they may have been 
        #recently opened or details does not exist in FourSquare Database
        id,name,likes,rating,tips=[0]*5
    print('(',count,'/',len(italian_rest_Staten_Island),')','processed')
    italian_rest_stats_Staten_Island = italian_rest_stats_Staten_Island.append({'Borough': Borough,
                                                'Neighborhood': Neighborhood, 
                                                'ID': id,
                                                'Name' : name,
                                                'Likes' : likes,
                                                'Rating' : rating,
                                                'Tips' : tips
                                               }, ignore_index=True)
    count+=1
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 590928301de7651d663ae087
( 1 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4a271f0cf964a5205c911fe3  Enoteca Maria     92     7.6    40
( 2 / 104 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4b76d8dbf964a520be632ee3  Pier 76 Italian Restaurant     79     7.9    44
( 3 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  590928301de7651d663ae087  Marie's 2      9     8.1     2
( 4 / 104 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4b76d8dbf964a520be632ee3  Pier 76 Italian Restaurant     79     7.9    44
( 5 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4a271f0cf964a5205c911fe3  Enoteca Maria     92     7.6    40
( 6 / 104 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4bcc8e3bb6c49c7422ed9391  Tony's Brick Oven Pizzeria     18     8.3    18
( 7 / 104 ) processed
                         ID   Name  Likes  Rating  Tips
0  4e179bdc52b123a586ceea11  Bin 5     19     8.2     7
( 8 / 104 ) processed
                         ID                Name  Likes  Rating  Tips
0  4bbb8986e452952190d154a4  Da Noi Fingerboard     20     7.4     6
( 9 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4b63728ff964a5208d7a2ae3
( 10 / 104 ) processed
                         ID          Name  Likes  Rating  Tips
0  4b5b58dbf964a52088f628e3  Panini Grill     22     8.4  1136
( 11 / 104 ) processed
                         ID         Name  Likes  Rating  Tips
0  4bf872974a67c928b57725cf  Cafe Milano     19     8.0     6
( 12 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b6b0b96f964a52001ef2be3  Pastosa's     13     7.7     6
( 13 / 104 ) processed
                         ID                                Name  Likes  \
0  4d51deac3062a1cd37786ba3  Bella Mama Rose Italian Restaurant      6   

   Rating  Tips  
0     6.6    10  
( 14 / 104 ) processed
                         ID        Name  Likes  Rating  Tips
0  4b9a599af964a5201aae35e3  Cucina Mia      5     7.1     3
( 15 / 104 ) processed
                         ID        Name  Likes  Rating  Tips
0  4e35b9daaeb7f67fbd346ef9  Waterfalls      7     5.9    25
( 16 / 104 ) processed
                         ID               Name  Likes  Rating  Tips
0  4ad910d8f964a520b81721e3  Da Noi Restaraunt     13     7.9     6
( 17 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b343839f964a5203a2625e3  La Strada     24     8.4    10
( 18 / 104 ) processed
                         ID    Name  Likes  Rating  Tips
0  4be61580d4f7c9b6fe662620  Brioso     22     7.6    15
( 19 / 104 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4bc73ff96501c9b696063e29  Little Italy Gourmet     12     7.5     6
( 20 / 104 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b9fb541f964a520fd3637e3  La Fontana Restaurant     16     6.9     8
( 21 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4eac61a861af01ea2b33028f
( 22 / 104 ) processed
                         ID                            Name  Likes  Rating  \
0  517dbe77e4b0eef580c875a3  Piccolino's italian Restaurant     13     7.9   

   Tips  
0     2  
( 23 / 104 ) processed
                         ID                        Name  Likes  Rating  Tips
0  5182ef83498e59069ff5e71b  Patrizia's Pizza and Pasta     59     8.0   190
( 24 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4d4b4295ad4a6ea89135fbe9  Fiore Di Mare      6     8.5     5
( 25 / 104 ) processed
                         ID                            Name  Likes  Rating  \
0  4cb8efaa90c9a143a5e183d6  Benvenuti Pizzeria e Trattoria      3     5.8   

   Tips  
0     9  
( 26 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 596fd80235811b1c18aa0d51
( 27 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c87e4459c7db1f71f8d97be
( 28 / 104 ) processed
                         ID                 Name  Likes  Rating  Tips
0  4c4a44f9bad7a593ee641daa  Giovannis Trattoria     10     7.4     4
( 29 / 104 ) processed
                         ID                        Name  Likes  Rating  Tips
0  5182ef83498e59069ff5e71b  Patrizia's Pizza and Pasta     59     8.0   190
( 30 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4faee0e2e4b08260e41249d3
( 31 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 5b04e01362845c00243e93b7
( 32 / 104 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4bf08bf117880f47a3782937  Angelina's Ristorante     37     8.3    23
( 33 / 104 ) processed
                         ID                         Name  Likes  Rating  Tips
0  59fc9f85f193c02897fc2369  Deluca’s Italian Restaurant      8     7.6     2
( 34 / 104 ) processed
                         ID                Name  Likes  Rating  Tips
0  537e9b77498e6816a1f38ca6  Dinico of mulberry      5     6.3     1
( 35 / 104 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4b76d8dbf964a520be632ee3  Pier 76 Italian Restaurant     79     7.9    44
( 36 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  590928301de7651d663ae087  Marie's 2      9     8.1     2
( 37 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4a271f0cf964a5205c911fe3  Enoteca Maria     92     7.6    40
( 38 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b8a719df964a520016d32e3  Jimmy Max     49     8.1    15
( 39 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4bddbdea587b2d7fc5e25409  Basilio's Inn     17     7.3     4
( 40 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4c2546d5a852c928e5a2e46c  Italianissimo     14     7.0     7
( 41 / 104 ) processed
                         ID    Name  Likes  Rating  Tips
0  4b803abff964a520cd5e30e3  Nino's     21     8.2     9
( 42 / 104 ) processed
                         ID     Name  Likes  Rating  Tips
0  4be73347d4f7c9b66c992720  Bocelli     35     7.6    13
( 43 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b9bdbd8f964a5201e2e36e3  Cafe Luna     14     7.2     7
( 44 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c2546d5a852c928e5a2e46c
( 45 / 104 ) processed
                         ID             Name  Likes  Rating  Tips
0  4bcf46d4a8b3a593fae6615f  Pastosa Ravioli     32     9.1     8
( 46 / 104 ) processed
                         ID     Name  Likes  Rating  Tips
0  4be73347d4f7c9b66c992720  Bocelli     35     7.6    13
( 47 / 104 ) processed
                         ID              Name  Likes  Rating  Tips
0  4303cf80f964a5201c271fe3  Trattoria Romana     60     7.7    17
( 48 / 104 ) processed
                         ID    Name  Likes  Rating  Tips
0  4b803abff964a520cd5e30e3  Nino's     21     8.2     9
( 49 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b9bdbd8f964a5201e2e36e3  Cafe Luna     14     7.2     7
( 50 / 104 ) processed
                         ID              Name  Likes  Rating  Tips
0  4daa28bd93a04642f079c973  Cielo Ristorante     12     7.0     3
( 51 / 104 ) processed
                         ID               Name  Likes  Rating  Tips
0  4af72d60f964a520ce0622e3  Pasticceria Bruno     39     7.5    23
( 52 / 104 ) processed
                         ID         Name  Likes  Rating  Tips
0  4ba80534f964a520f6c639e3  Max's Es-Ca     27     8.8   174
( 53 / 104 ) processed
                         ID     Name  Likes  Rating  Tips
0  54e13989498ed2a42c122b0f  Mario's     17     7.9     9
( 54 / 104 ) processed
                         ID               Name  Likes  Rating  Tips
0  4af72d60f964a520ce0622e3  Pasticceria Bruno     39     7.5    23
( 55 / 104 ) processed
                         ID              Name  Likes  Rating  Tips
0  4303cf80f964a5201c271fe3  Trattoria Romana     60     7.7    17
( 56 / 104 ) processed
                         ID                            Name  Likes  Rating  \
0  53e3fedd498ed822e0283349  Michael's Meatballs & Martinis     22     7.1   

   Tips  
0     8  
( 57 / 104 ) processed
                         ID              Name  Likes  Rating  Tips
0  4daa28bd93a04642f079c973  Cielo Ristorante     12     7.0     3
( 58 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4addf818f964a520de6621e3
( 59 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4d7acef35462b60c7c97cbd8  Cucina Fresca      5     8.0     5
( 60 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b343839f964a5203a2625e3  La Strada     24     8.4    10
( 61 / 104 ) processed
                         ID    Name  Likes  Rating  Tips
0  4be61580d4f7c9b6fe662620  Brioso     22     7.6    15
( 62 / 104 ) processed
                         ID                  Name  Likes  Rating  Tips
0  4bc73ff96501c9b696063e29  Little Italy Gourmet     12     7.5     6
( 63 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4d93fbaf8deb8cfa1ec436c0
( 64 / 104 ) processed
                         ID                            Name  Likes  Rating  \
0  517dbe77e4b0eef580c875a3  Piccolino's italian Restaurant     13     7.9   

   Tips  
0     2  
( 65 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c87e4459c7db1f71f8d97be
( 66 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 596fd80235811b1c18aa0d51
( 67 / 104 ) processed
                         ID                            Name  Likes  Rating  \
0  4cb8efaa90c9a143a5e183d6  Benvenuti Pizzeria e Trattoria      3     5.8   

   Tips  
0     9  
( 68 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4cfacc6cfeec6dcbb7724236
( 69 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4ba42ec8f964a520c48938e3
( 70 / 104 ) processed
                         ID     Name  Likes  Rating  Tips
0  4ba6706af964a520875239e3  Nucci's     29     7.6     7
( 71 / 104 ) processed
                         ID                      Name  Likes  Rating  Tips
0  4f5b584da17c35d95157d1ec  Zio Toto - Staten Island     14     7.2     8
( 72 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 5b66428792e7a9002ca7cc7d
( 73 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c435d1e2d3ec9b6a3672dae
( 74 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  50189ccee4b0d35e6d8774f8  Villa Monte's     11     6.6     5
( 75 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4c364d5f93db0f4754d81d92  All Star Cafe      5     7.5     4
( 76 / 104 ) processed
                         ID               Name  Likes  Rating  Tips
0  4ad910d8f964a520b81721e3  Da Noi Restaraunt     13     7.9     6
( 77 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c853b75e602b1f731beb57a
( 78 / 104 ) processed
                         ID            Name  Likes  Rating  Tips
0  4bfaf5c9ab180f477f32b3ce  Cafe del Mondo     10     5.5     6
( 79 / 104 ) processed
                         ID        Name  Likes  Rating  Tips
0  5079ccdce4b065f1dd8155ad  Casa verde      8     7.8     3
( 80 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c27cc8f3492a593cb72b628
( 81 / 104 ) processed
                         ID                   Name  Likes  Rating  Tips
0  4b9fb541f964a520fd3637e3  La Fontana Restaurant     16     6.9     8
( 82 / 104 ) processed
                         ID   Name  Likes  Rating  Tips
0  4e179bdc52b123a586ceea11  Bin 5     19     8.2     7
( 83 / 104 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4bcc8e3bb6c49c7422ed9391  Tony's Brick Oven Pizzeria     18     8.3    18
( 84 / 104 ) processed
                         ID                Name  Likes  Rating  Tips
0  4bbb8986e452952190d154a4  Da Noi Fingerboard     20     7.4     6
( 85 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4b63728ff964a5208d7a2ae3
( 86 / 104 ) processed
                         ID                        Name  Likes  Rating  Tips
0  4bcc8e3bb6c49c7422ed9391  Tony's Brick Oven Pizzeria     18     8.3    18
( 87 / 104 ) processed
                         ID   Name  Likes  Rating  Tips
0  4e179bdc52b123a586ceea11  Bin 5     19     8.2     7
( 88 / 104 ) processed
                         ID             Name  Likes  Rating  Tips
0  4bcf46d4a8b3a593fae6615f  Pastosa Ravioli     32     9.1     8
( 89 / 104 ) processed
                         ID    Name  Likes  Rating  Tips
0  4b803abff964a520cd5e30e3  Nino's     21     8.2     9
( 90 / 104 ) processed
                         ID     Name  Likes  Rating  Tips
0  4be73347d4f7c9b66c992720  Bocelli     35     7.6    13
( 91 / 104 ) processed
                         ID       Name  Likes  Rating  Tips
0  4b9bdbd8f964a5201e2e36e3  Cafe Luna     14     7.2     7
( 92 / 104 ) processed
                         ID             Name  Likes  Rating  Tips
0  4bcf46d4a8b3a593fae6615f  Pastosa Ravioli     32     9.1     8
( 93 / 104 ) processed
                         ID         Name  Likes  Rating  Tips
0  4bf872974a67c928b57725cf  Cafe Milano     19     8.0     6
( 94 / 104 ) processed
                         ID                                Name  Likes  \
0  4d51deac3062a1cd37786ba3  Bella Mama Rose Italian Restaurant      6   

   Rating  Tips  
0     6.6    10  
( 95 / 104 ) processed
                         ID        Name  Likes  Rating  Tips
0  4e35b9daaeb7f67fbd346ef9  Waterfalls      7     5.9    25
( 96 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 5b04e01362845c00243e93b7
( 97 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4c27cc8f3492a593cb72b628  Classic Pizza      7     7.7     2
( 98 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c091311a1b32d7f5efb96f0
( 99 / 104 ) processed
                         ID        Name  Likes  Rating  Tips
0  5079ccdce4b065f1dd8155ad  Casa verde      8     7.8     3
( 100 / 104 ) processed
                         ID           Name  Likes  Rating  Tips
0  4c27cc8f3492a593cb72b628  Classic Pizza      7     7.7     2
( 101 / 104 ) processed
                         ID                      Name  Likes  Rating  Tips
0  4f5b584da17c35d95157d1ec  Zio Toto - Staten Island     14     7.2     8
( 102 / 104 ) processed
                         ID     Name  Likes  Rating  Tips
0  4ba6706af964a520875239e3  Nucci's     29     7.6     7
( 103 / 104 ) processed
Empty DataFrame
Columns: [ID, Name, Likes, Rating, Tips]
Index: []
No data available for id= 4c435d1e2d3ec9b6a3672dae
( 104 / 104 ) processed

Compile the Italian Restaurants data for all 5 Boroughs

In [83]:
italian_rest_stats_ny = italian_rest_stats_Bronx.append(italian_rest_stats_Brooklyn,ignore_index=True).append(italian_rest_stats_Manhattan,ignore_index=True).append(italian_rest_stats_Queens,ignore_index=True).append(italian_rest_stats_Staten_Island,ignore_index=True)
In [84]:
italian_rest_stats_Bronx.shape
Out[84]:
(86, 7)
In [85]:
italian_rest_stats_Bronx
Out[85]:
Borough Neighborhood ID Name Likes Rating Tips
0 Bronx Riverdale 55aaee4d498e3cbb70e625d6 Bella Notte Pizzeria 9 7.1 4
1 Bronx Kingsbridge 55aaee4d498e3cbb70e625d6 Bella Notte Pizzeria 9 7.1 4
2 Bronx Woodlawn 511edb6de4b0d58346fd272d Patrizia's Of Woodlawn 18 8.4 14
3 Bronx Woodlawn 4d3cb3026b3d236a066a6364 Rivers Edge 10 6.7 8
4 Bronx Baychester 4c9518076b35a143d5dc21dc Fratelli's 22 8.6 6
5 Bronx Baychester 5411894d498e4a254a11a46c Olive Garden 26 7.4 8
6 Bronx Pelham Parkway 4bf96ae65317a593d837017f Enzo's 26 8.6 11
7 Bronx Pelham Parkway 4b10591af964a5205f6e23e3 Patricia's 84 8.5 39
8 Bronx Pelham Parkway 4b47f069f964a5208c4426e3 Pasta Pasta 9 6.3 8
9 Bronx City Island 4514ed4df964a520e5391fe3 Artie's Steak and Seafood 44 8.2 27
10 Bronx City Island 55905336498e1a9217de2a7a Scavello's On The Island 13 8.5 2
11 Bronx City Island 4b80a1c3f964a520488230e3 Portofino Restaurant 10 6.1 10
12 Bronx Bedford Park 4b1712a8f964a520dbc123e3 Jolly Tinker 19 7.1 4
13 Bronx Fordham 4acf80aef964a52025d420e3 Tino's Delicatessen 145 9.3 48
14 Bronx Fordham 4bb6470cef159c7465b275f7 Calabria Pork Store 30 8.9 13
15 Bronx Fordham 4aa425bef964a5208e4520e3 Dominick's Restaurant 101 8.4 37
16 Bronx Fordham 59050f51b23dfa5f6649e678 Arthur Avenue Fiasco 10 8.2 4
17 Bronx Fordham 4b5514c4f964a5207cda27e3 Enzo's 43 8.2 19
18 Bronx Fordham 4b5a4c8ff964a52049bb28e3 Emilia's Restaurant 32 8.1 16
19 Bronx Fordham 4af71916f964a520cf0522e3 Michaelangelo's Coal Fired Brick Oven Pizza Re... 39 7.8 25
20 Bronx Fordham 4c9b9e7b9c663704b90463fd Gerbasi Ristorante 15 7.7 12
21 Bronx Fordham 53ff939c498e6b601dfa3979 San Gennaro Ristorante 17 7.1 1
22 Bronx Fordham 4bc67f1104e8b713a833362d Ann & Tony's - An Original Arthur Avenue Resta... 12 7.1 8
23 Bronx Melrose 5956be26123a195de6701c2b Porto Salvo 10 8.4 5
24 Bronx Melrose 4bb692672ea19521a6ecab2f Venice Restaurant & Pizzeria 8 6.8 9
25 Bronx Mott Haven 4e6acfb1ae60950955a9b02b Wish 37 3 6.6 6
26 Bronx Morrisania 5956be26123a195de6701c2b Porto Salvo 10 8.4 5
27 Bronx Throgs Neck 4b4e3e87f964a5209de626e3 Patricia's of Tremont 48 8.2 29
28 Bronx Throgs Neck 4b958fccf964a52091a934e3 Ice House Cafe 11 7.4 14
29 Bronx Throgs Neck 4d4456d93616b60c953fe3c2 Tosca Marquee 20 6.8 14
30 Bronx Throgs Neck 4c1d717b8b3aa59363a99a5f Spoto's Italian Restaurant 6 6.6 11
31 Bronx Throgs Neck 4b6cb1c0f964a520d04c2ce3 Mamma Lucia's Pizza & Pasta 3 6.6 10
32 Bronx Throgs Neck 4b491198f964a5208f6426e3 Rino's Italian Restaurant 6 6.6 1
33 Bronx Country Club 4c9e1ef2542b224b70a3f09f Lucca Italian Restaurant 7 7.7 4
34 Bronx Country Club 4b85b6b3f964a5209b6e31e3 Giovanni's Italian Restaurant 11 7.5 10
35 Bronx Country Club 4b634812f964a520936f2ae3 Vito's Deli 6 6.8 5
36 Bronx Country Club 0 0 0 0.0 0
37 Bronx Westchester Square 51aa5120498ec578a5ad0ac4 The Pines 4 6.9 4
38 Bronx Westchester Square 0 0 0 0.0 0
39 Bronx Van Nest 3fd66200f964a5207bf11ee3 F & J Pine Tavern 176 8.7 72
40 Bronx Van Nest 4bd1d5fdcaff95211c6ed1f0 900 Park Restaurant 57 7.3 19
41 Bronx Morris Park 4b10591af964a5205f6e23e3 Patricia's 84 8.5 39
42 Bronx Morris Park 4bf96ae65317a593d837017f Enzo's 26 8.6 11
43 Bronx Morris Park 4bd1d5fdcaff95211c6ed1f0 900 Park Restaurant 57 7.3 19
44 Bronx Morris Park 51aa5120498ec578a5ad0ac4 The Pines 4 6.9 4
45 Bronx Morris Park 4b47f069f964a5208c4426e3 Pasta Pasta 9 6.3 8
46 Bronx Belmont 4acf80aef964a52025d420e3 Tino's Delicatessen 145 9.3 48
47 Bronx Belmont 4bb6470cef159c7465b275f7 Calabria Pork Store 30 8.9 13
48 Bronx Belmont 4af0fa29f964a52060e021e3 Antonio's Trattoria 117 8.9 44
49 Bronx Belmont 59050f51b23dfa5f6649e678 Arthur Avenue Fiasco 10 8.2 4
50 Bronx Belmont 4aa425bef964a5208e4520e3 Dominick's Restaurant 101 8.4 37
51 Bronx Belmont 4b5514c4f964a5207cda27e3 Enzo's 43 8.2 19
52 Bronx Belmont 4af71916f964a520cf0522e3 Michaelangelo's Coal Fired Brick Oven Pizza Re... 39 7.8 25
53 Bronx Belmont 4b5a4c8ff964a52049bb28e3 Emilia's Restaurant 32 8.1 16
54 Bronx Belmont 4c9b9e7b9c663704b90463fd Gerbasi Ristorante 15 7.7 12
55 Bronx Belmont 4aa193d5f964a520124120e3 Mario's Restaurant & Catering 54 8.0 26
56 Bronx Belmont 4a8e261cf964a5201c1220e3 Roberto's 65 8.1 23
57 Bronx Belmont 4c79d294278eb713f6a05580 Cafe al Mercato 10 7.9 5
58 Bronx Belmont 4cb0d382ef1b370419643e00 David Greco's Arthur Avenue Trattoria 6 7.7 6
59 Bronx Belmont 4b5bc595f964a520431529e3 Pasquale Riggaletto's 33 7.5 18
60 Bronx Belmont 53ff939c498e6b601dfa3979 San Gennaro Ristorante 17 7.1 1
61 Bronx Spuyten Duyvil 55aaee4d498e3cbb70e625d6 Bella Notte Pizzeria 9 7.1 4
62 Bronx North Riverdale 4b3bdd2cf964a520f57c25e3 Madison's 12 7.5 4
63 Bronx North Riverdale 4b451a29f964a520ad0426e3 Beccofino 28 7.8 18
64 Bronx Pelham Bay 4b85b6b3f964a5209b6e31e3 Giovanni's Italian Restaurant 11 7.5 10
65 Bronx Pelham Bay 4c9e1ef2542b224b70a3f09f Lucca Italian Restaurant 7 7.7 4
66 Bronx Pelham Bay 4bc20b8d2a89ef3b6f1af388 Villa Barone Ristorante 15 6.9 12
67 Bronx Pelham Bay 4b634812f964a520936f2ae3 Vito's Deli 6 6.8 5
68 Bronx Schuylerville 4b4e3e87f964a5209de626e3 Patricia's of Tremont 48 8.2 29
69 Bronx Schuylerville 4b491198f964a5208f6426e3 Rino's Italian Restaurant 6 6.6 1
70 Bronx Schuylerville 4c1d717b8b3aa59363a99a5f Spoto's Italian Restaurant 6 6.6 11
71 Bronx Edgewater Park 4b4e3e87f964a5209de626e3 Patricia's of Tremont 48 8.2 29
72 Bronx Edgewater Park 4b958fccf964a52091a934e3 Ice House Cafe 11 7.4 14
73 Bronx Edgewater Park 4d4456d93616b60c953fe3c2 Tosca Marquee 20 6.8 14
74 Bronx Edgewater Park 4c1d717b8b3aa59363a99a5f Spoto's Italian Restaurant 6 6.6 11
75 Bronx Edgewater Park 4b491198f964a5208f6426e3 Rino's Italian Restaurant 6 6.6 1
76 Bronx Edgewater Park 4b6cb1c0f964a520d04c2ce3 Mamma Lucia's Pizza & Pasta 3 6.6 10
77 Bronx Pelham Gardens 4c9518076b35a143d5dc21dc Fratelli's 22 8.6 6
78 Bronx Concourse 4bfd8d06f61dc9b669309fde Tiny's Pizza & Pasta 6 7.1 4
79 Bronx Concourse Village 5956be26123a195de6701c2b Porto Salvo 10 8.4 5
80 Bronx Concourse Village 4bfd8d06f61dc9b669309fde Tiny's Pizza & Pasta 6 7.1 4
81 Bronx Bronxdale 3fd66200f964a5207bf11ee3 F & J Pine Tavern 176 8.7 72
82 Bronx Bronxdale 4bf96ae65317a593d837017f Enzo's 26 8.6 11
83 Bronx Bronxdale 4b10591af964a5205f6e23e3 Patricia's 84 8.5 39
84 Bronx Bronxdale 4bd1d5fdcaff95211c6ed1f0 900 Park Restaurant 57 7.3 19
85 Bronx Bronxdale 4b47f069f964a5208c4426e3 Pasta Pasta 9 6.3 8
In [86]:
italian_rest_stats_Brooklyn.shape
Out[86]:
(114, 7)
In [87]:
italian_rest_stats_Brooklyn
Out[87]:
Borough Neighborhood ID Name Likes Rating Tips
0 Brooklyn Bay Ridge 4b70d8dff964a52063312de3 Tuscany Grill 15 7.9 7
1 Brooklyn Bay Ridge 3fd66200f964a5205fee1ee3 Ponte Vecchio Restaurant 39 7.8 17
2 Brooklyn Bay Ridge 4ad62c95f964a5208d0521e3 Zio Toto 16 7.2 34
3 Brooklyn Bay Ridge 4bd075f2caff952145d3cef0 Gino's Restaurant 139 8.4 57
4 Brooklyn Bay Ridge 4a7e205ef964a52012f11fe3 Sofia Restorante Italiano 15 7.0 10
5 Brooklyn Bay Ridge 4e732dff45dd41e9ccce1987 Giacomo's Wood Fired Pizza & Trattoria 23 7.1 20
6 Brooklyn Bensonhurst 4e30a139483bb3fdc436a7e3 Villa Fiorita 3 8.0 4
7 Brooklyn Bensonhurst 4ae23a80f964a5200c8c21e3 il Colosseo 30 7.6 22
8 Brooklyn Bensonhurst 4e073239cc3f1ed1312dce37 Panino Rustico 45 8.7 18
9 Brooklyn Bensonhurst 4c0791492e80a593eabf75f9 Papa Pasquale 12 8.2 5
10 Brooklyn Sunset Park 5095a98ae4b0038a605e6f45 Cafe Lore 7 7.3 6
11 Brooklyn Greenpoint 5424b085498ec9a9cdb44b70 Naked Dog 127 8.8 22
12 Brooklyn Greenpoint 5c6ddee8de3bbf002c44d83c Forma Pasta Factory 38 9.2 12
13 Brooklyn Gravesend 4ad8c329f964a520731421e3 Joe's of Avenue U 35 7.9 27
14 Brooklyn Sheepshead Bay 5a10a9d76e465053a63ca8c7 Patrizia’s Of Sheepshead Bay 11 8.2 0
15 Brooklyn Sheepshead Bay 4ad9fb95f964a520bb1c21e3 Il Fornetto 63 7.5 28
16 Brooklyn Sheepshead Bay 4c9e81bb54c8a1cdea8f8e4b Anthony's Place 28 8.2 10
17 Brooklyn Sheepshead Bay 55466c7e498e28eca31fc3e9 Next Door 17 7.3 4
18 Brooklyn Sheepshead Bay 4c03fc29f423a59314f7d016 Maria's Ristorante Italiano 12 6.7 4
19 Brooklyn Flatbush 52b90597498ed57b85609429 Lea 116 8.2 33
20 Brooklyn Windsor Terrace 4ec7fa185c5ce271be2b2bfa Giovanni's Brooklyn Eats 129 8.7 56
21 Brooklyn Windsor Terrace 4a85fd26f964a520f4ff1fe3 Provini 186 8.9 53
22 Brooklyn Windsor Terrace 582466b8a130da5121eb7b36 Flora 11 8.1 8
23 Brooklyn Windsor Terrace 4d7c069273ca54818e2c577c Piccoli 10 7.0 13
24 Brooklyn Windsor Terrace 5689b018498e9a7081b667e3 Della 31 6.8 2
25 Brooklyn Williamsburg 5cdf51a01f74400039a39cdf Dough Vale 6 8.1 5
26 Brooklyn Bushwick 5a98aed16a59506d7a60d67c Carmenta’s 58 9.4 21
27 Brooklyn Bushwick 587fad59e786b27f550ce708 Nicandra's 33 8.7 10
28 Brooklyn Brooklyn Heights 4be30f9dd27a20a1cd1f915b River Deli 301 9.0 99
29 Brooklyn Brooklyn Heights 3fd66200f964a520ece81ee3 Noodle Pudding 223 8.3 86
30 Brooklyn Brooklyn Heights 5a0740a3e1f22816d11723d5 Lillo 46 9.3 9
31 Brooklyn Brooklyn Heights 5044f749e4b0dd909d2cc123 Table 87 108 8.3 38
32 Brooklyn Cobble Hill 5a0740a3e1f22816d11723d5 Lillo 46 9.3 9
33 Brooklyn Cobble Hill 593329652632ec0582bd71df Popina 46 7.9 14
34 Brooklyn Cobble Hill 5044f749e4b0dd909d2cc123 Table 87 108 8.3 38
35 Brooklyn Cobble Hill 3fd66200f964a52042f11ee3 Ferdinando's Focacceria 73 8.4 34
36 Brooklyn Cobble Hill 5bdcfb3e6e69af0025d9e331 The Longshoreman 20 8.3 4
37 Brooklyn Cobble Hill 4be30f9dd27a20a1cd1f915b River Deli 301 9.0 99
38 Brooklyn Carroll Gardens 49c4ff90f964a520da561fe3 Fragole 103 8.3 46
39 Brooklyn Carroll Gardens 41abb800f964a520561e1fe3 Frankies 457 Spuntino 822 9.1 234
40 Brooklyn Carroll Gardens 4aa85f31f964a520075120e3 Vinny's of Carroll Gardens 63 7.9 40
41 Brooklyn Carroll Gardens 5c034c3ff5e9d7002c2a78b1 Franks Wine Bar 55 8.2 8
42 Brooklyn Carroll Gardens 5a56ac38dd70c54d5825002f Panzerotti Bites 23 7.9 3
43 Brooklyn Carroll Gardens 5766ad56498ebf269c3737d2 Gersi 75 7.7 15
44 Brooklyn Carroll Gardens 4bba7fbe3db7b7131269239a Verde on Smith 108 7.8 58
45 Brooklyn Gowanus 41abb800f964a520561e1fe3 Frankies 457 Spuntino 822 9.1 234
46 Brooklyn Gowanus 5c034c3ff5e9d7002c2a78b1 Franks Wine Bar 55 8.2 8
47 Brooklyn Gowanus 49d10b5af964a520545b1fe3 Bar Tano 143 7.9 50
48 Brooklyn Gowanus 49c4ff90f964a520da561fe3 Fragole 103 8.3 46
49 Brooklyn Fort Greene 5a00f3538496ca58fd9e2856 Evelina Restaurant 192 9.4 34
50 Brooklyn Fort Greene 4c2d1eb17d85a593fa1452f3 Dino 228 8.4 96
51 Brooklyn Fort Greene 4afca48af964a520ab2422e3 Roman’s 295 8.7 116
52 Brooklyn Fort Greene 57a3dfc8498e490e4b231778 LaRina Pastificio & Vino 148 9.1 20
53 Brooklyn Fort Greene 4fbabf08e4b0ffe177a56434 Aita 292 8.9 76
54 Brooklyn Park Slope 44bcb47ef964a5209b351fe3 al di là 558 8.9 192
55 Brooklyn Starrett City 4b2fd53cf964a520d8f024e3 Olive Garden 147 6.7 53
56 Brooklyn Manhattan Beach 5a10a9d76e465053a63ca8c7 Patrizia’s Of Sheepshead Bay 11 8.2 0
57 Brooklyn Manhattan Beach 4ad9fb95f964a520bb1c21e3 Il Fornetto 63 7.5 28
58 Brooklyn Manhattan Beach 55466c7e498e28eca31fc3e9 Next Door 17 7.3 4
59 Brooklyn Manhattan Beach 4c0183fd58dbc928d581ee6b Papa Leone Pizza 5 7.4 7
60 Brooklyn Manhattan Beach 4c03fc29f423a59314f7d016 Maria's Ristorante Italiano 12 6.7 4
61 Brooklyn Coney Island 4b4a6c40f964a5201e8726e3 Gargiulo's Restaurant 88 8.4 24
62 Brooklyn Bath Beach 4afac880f964a520ad1822e3 Pino's Ristorante 7 7.0 7
63 Brooklyn Bath Beach 521a7e8a498e9a3defc15591 Casa Edesia Pizza and Grill 7 6.9 5
64 Brooklyn Bath Beach 5caa190cf427de002cc9c76f Olive Garden 3 6.8 3
65 Brooklyn Dyker Heights 3fd66200f964a5205fee1ee3 Ponte Vecchio Restaurant 39 7.8 17
66 Brooklyn Dyker Heights 4fcc08eebb3d3d2d8021af06 Tony's Pizzeria 12 7.4 7
67 Brooklyn Dyker Heights 0 0 0 0.0 0
68 Brooklyn Gerritsen Beach 4c03fc29f423a59314f7d016 Maria's Ristorante Italiano 12 6.7 4
69 Brooklyn Gerritsen Beach 0 0 0 0.0 0
70 Brooklyn Marine Park 4b92c1e7f964a520eb1834e3 Frank's Pizzeria & Restaurant 26 7.2 9
71 Brooklyn Marine Park 4c0ad38aa1b32d7fb4109af0 Salvi's 7 7.2 4
72 Brooklyn Clinton Hill 57a3dfc8498e490e4b231778 LaRina Pastificio & Vino 148 9.1 20
73 Brooklyn Clinton Hill 572d1d41498e2483c3bed970 Da Ciro Brooklyn 15 8.0 7
74 Brooklyn Clinton Hill 5a00f3538496ca58fd9e2856 Evelina Restaurant 192 9.4 34
75 Brooklyn Clinton Hill 4afca48af964a520ab2422e3 Roman’s 295 8.7 116
76 Brooklyn Clinton Hill 4c2d1eb17d85a593fa1452f3 Dino 228 8.4 96
77 Brooklyn Clinton Hill 4fbabf08e4b0ffe177a56434 Aita 292 8.9 76
78 Brooklyn Downtown 4d9f5a9efc4f721e7e5a9d5f Rucola 872 9.1 233
79 Brooklyn Boerum Hill 4d9f5a9efc4f721e7e5a9d5f Rucola 872 9.1 233
80 Brooklyn Prospect Lefferts Gardens 59bfcdfb2079551e2b628d20 Camillo 54 8.4 12
81 Brooklyn Prospect Lefferts Gardens 4b905bbcf964a5200f8633e3 Gino's Brick Oven Pizza and Trattoria 32 7.3 29
82 Brooklyn Bergen Beach 4b467ca0f964a5206d2226e3 Il Posto 14 7.5 4
83 Brooklyn Prospect Park South 52b90597498ed57b85609429 Lea 116 8.2 33
84 Brooklyn Georgetown 4c267153b012b71350e30893 Landi's Pork Store 32 8.5 11
85 Brooklyn Georgetown 4b467ca0f964a5206d2226e3 Il Posto 14 7.5 4
86 Brooklyn Georgetown 4c2bbd1b2219c9288312a548 Pastosa Ravioli 6 7.2 1
87 Brooklyn Georgetown 5698109e498eb4e676c57b75 Dolce Vita 6 6.2 2
88 Brooklyn East Williamsburg 58eac71c0319b80a65d5045b Ammazza Caffe 71 9.1 14
89 Brooklyn East Williamsburg 4ffa2f57e4b05ae525579d36 Testo 132 8.6 40
90 Brooklyn East Williamsburg 4a358dfaf964a5202d9d1fe3 Il Passatore 183 8.3 65
91 Brooklyn North Side 4dcabca41f6e2812677e3598 The Meatball Shop 1337 8.8 374
92 Brooklyn North Side 4106ec80f964a520890b1fe3 Aurora 447 8.9 118
93 Brooklyn Ocean Parkway 4c0b017aa1b32d7f1d6d9af0 La Palina 34 8.6 18
94 Brooklyn Ocean Parkway 4c8455bfe602b1f7a28cae7a Cafe Renaissance 4 5.9 6
95 Brooklyn Ocean Parkway 0 0 0 0.0 0
96 Brooklyn Fort Hamilton 525c26bc11d277827d14468f Campania Coal Fired Pizza 75 8.8 19
97 Brooklyn Fort Hamilton 55ff210c498ef9c10335dc0b Positano 39 8.0 10
98 Brooklyn Fort Hamilton 3fd66200f964a5205fee1ee3 Ponte Vecchio Restaurant 39 7.8 17
99 Brooklyn Fort Hamilton 4b70d8dff964a52063312de3 Tuscany Grill 15 7.9 7
100 Brooklyn Fort Hamilton 5524916d498ee874044a6feb Grotto 11 7.0 5
101 Brooklyn Ditmas Park 52b90597498ed57b85609429 Lea 116 8.2 33
102 Brooklyn Remsen Village 0 0 0 0.0 0
103 Brooklyn Mill Basin 4c267153b012b71350e30893 Landi's Pork Store 32 8.5 11
104 Brooklyn Mill Basin 4c2bbd1b2219c9288312a548 Pastosa Ravioli 6 7.2 1
105 Brooklyn Mill Basin 5698109e498eb4e676c57b75 Dolce Vita 6 6.2 2
106 Brooklyn Fulton Ferry 593c0d2262420b7feccc3048 Cecconi's 333 8.7 72
107 Brooklyn Fulton Ferry 3fd66200f964a520ece81ee3 Noodle Pudding 223 8.3 86
108 Brooklyn Vinegar Hill 593c0d2262420b7feccc3048 Cecconi's 333 8.7 72
109 Brooklyn Vinegar Hill 3fd66200f964a520ece81ee3 Noodle Pudding 223 8.3 86
110 Brooklyn Dumbo 593c0d2262420b7feccc3048 Cecconi's 333 8.7 72
111 Brooklyn Dumbo 3fd66200f964a520ece81ee3 Noodle Pudding 223 8.3 86
112 Brooklyn Homecrest 4c8455bfe602b1f7a28cae7a Cafe Renaissance 4 5.9 6
113 Brooklyn Madison 42508380f964a520c1201fe3 Michael's 57 8.1 11
In [88]:
italian_rest_stats_Manhattan.shape
Out[88]:
(138, 7)
In [89]:
italian_rest_stats_Manhattan
Out[89]:
Borough Neighborhood ID Name Likes Rating Tips
0 Manhattan Washington Heights 4d21107c6e8c37042b58ff9f Saggio Restaurant 119 8.7 62
1 Manhattan Hamilton Heights 56d8e01d498ef1500ae7fbfe Fumo 102 9.0 22
2 Manhattan Hamilton Heights 558c6d42498eab8b9ee8da37 Bono Trattoria 101 8.7 19
3 Manhattan Manhattanville 457f1183f964a5204b3f1fe3 Pisticci Ristorante 403 9.1 146
4 Manhattan Manhattanville 4c956003f7cfa1cd2e2ebd15 Bettolona 91 8.0 40
5 Manhattan Manhattanville 56d8e01d498ef1500ae7fbfe Fumo 102 9.0 22
6 Manhattan Manhattanville 3fd66200f964a52006e91ee3 Max SoHa 112 7.8 60
7 Manhattan Central Harlem 56d8e01d498ef1500ae7fbfe Fumo 102 9.0 22
8 Manhattan East Harlem 3fd66200f964a5207de81ee3 Rao's 78 8.7 33
9 Manhattan East Harlem 51800134e4b03b4e898c8f16 Armonie 15 8.5 10
10 Manhattan East Harlem 53effc79498eddd22101127d Nocciola Ristorante 25 7.7 9
11 Manhattan Upper East Side 4a22d7f9f964a520977d1fe3 Sant Ambroeus 317 8.7 87
12 Manhattan Upper East Side 4a6133a6f964a52015c21fe3 Caffe Buon Gusto - Manhattan 109 8.9 38
13 Manhattan Upper East Side 4ab972d6f964a520697f20e3 Parma Restaurant 15 8.1 14
14 Manhattan Upper East Side 42699000f964a52049211fe3 Uva 802 9.1 231
15 Manhattan Upper East Side 562c1df4498e2c64fb4a9faa San Matteo Pizzeria e Cucina 105 8.7 25
16 Manhattan Upper East Side 56bce4c5498ef768f74f4e6c Come Prima Ristorante 15 8.6 4
17 Manhattan Upper East Side 4b23ee1ef964a520255d24e3 Caffe Grazie 68 8.1 26
18 Manhattan Yorkville 4e4078922271a89dd083d07e Felice 83 152 8.7 39
19 Manhattan Yorkville 4b623700f964a520a83c2ae3 Nica Trattoria 29 8.4 19
20 Manhattan Yorkville 4b651459f964a52030e32ae3 Italianissimo Ristorante 31 8.7 14
21 Manhattan Yorkville 4b981d9af964a520802d35e3 Elio's 120 9.1 49
22 Manhattan Yorkville 504bb0fae4b0d1cf33ca07d0 83 1/2 43 8.3 22
23 Manhattan Yorkville 562c1df4498e2c64fb4a9faa San Matteo Pizzeria e Cucina 105 8.7 25
24 Manhattan Lenox Hill 4b775e32f964a520a6952ee3 Campagnola Restaurant 32 8.1 37
25 Manhattan Lenox Hill 42699000f964a52049211fe3 Uva 802 9.1 231
26 Manhattan Lenox Hill 4a6133a6f964a52015c21fe3 Caffe Buon Gusto - Manhattan 109 8.9 38
27 Manhattan Lenox Hill 51c9e3f9498e2cb9c31d19ff The Meatball Shop 656 8.4 178
28 Manhattan Lenox Hill 3fd66200f964a52075e91ee3 Bella Blu 62 8.0 24
29 Manhattan Lenox Hill 56bce4c5498ef768f74f4e6c Come Prima Ristorante 15 8.6 4
30 Manhattan Roosevelt Island 4b775e32f964a520a6952ee3 Campagnola Restaurant 32 8.1 37
31 Manhattan Upper West Side 42489a80f964a5208a201fe3 Celeste 240 8.5 127
32 Manhattan Upper West Side 56afed04498e39e35747adf2 Pizzeria Sirenetta 154 8.8 35
33 Manhattan Upper West Side 4d68839467a8f04df7ee01be Osteria Cotta 435 8.6 170
34 Manhattan Upper West Side 4a7778a1f964a5209be41fe3 Carmine's Italian Restaurant 389 8.2 130
35 Manhattan Upper West Side 5282b4bf11d2b180cc775713 Cibo E Vino 80 7.8 12
36 Manhattan Lincoln Square 459395b7f964a52047401fe3 Cafe Fiorello 252 8.2 140
37 Manhattan Lincoln Square 4b69b408f964a520c5ae2be3 Noi Due 39 8.0 26
38 Manhattan Lincoln Square 548a64ae498e972164140a84 Parm 371 8.6 73
39 Manhattan Lincoln Square 54961b98498eccc96c4a93d7 Masseria dei Vini 108 8.5 29
40 Manhattan Lincoln Square 4ee6366b77c8e89319c7e4b8 Joanne Trattoria 132 7.7 64
41 Manhattan Clinton 5633bec0498e430fc8ba8f3c La Vela Dining & Bar 23 8.2 6
42 Manhattan Clinton 4dcae1b18877502200c95822 Sergimmo Salumeria 328 8.8 129
43 Manhattan Clinton 506e48ffe4b078ebe1c30a29 Bocca Di Bacco 107 8.1 38
44 Manhattan Clinton 49d5651df964a520915c1fe3 Nizza 196 8.0 118
45 Manhattan Chelsea 511d6006e4b0a486ec088c89 The Meatball Shop 1003 8.8 192
46 Manhattan Chelsea 4533d338f964a5208f3b1fe3 Del Posto 655 8.6 281
47 Manhattan Greenwich Village 504b2a9ee4b006c435a465d3 Carbone 704 9.2 233
48 Manhattan Greenwich Village 5ab53749446ea6289e41b0e6 Coco Pazzo Kitchen & Restaurant 57 8.9 11
49 Manhattan Greenwich Village 556f4ef2498ee60139b28c72 Dante NYC 494 9.2 134
50 Manhattan Greenwich Village 56d92e05498e6c54b6325b19 San Carlo Osteria Piemonte 104 9.1 41
51 Manhattan Greenwich Village 51278a09e4b0b624edbc914c Charlie Bird 731 8.8 186
52 Manhattan Greenwich Village 543075b3498e283e38ad9dec Cotenna 883 9.0 233
53 Manhattan Greenwich Village 3fd66200f964a5202de71ee3 Palma 483 8.9 127
54 Manhattan Greenwich Village 4cc6222106c25481d7a4a047 Rubirosa Ristorante 2491 9.2 825
55 Manhattan Greenwich Village 4d9f8d97a428a1cdd92acb04 Parm 1129 8.8 494
56 Manhattan Greenwich Village 534c7a27498efe3d035cbbe9 Baker & Co. 399 8.8 98
57 Manhattan Greenwich Village 54459a46498ecf8ec204cc61 Vic's 467 8.9 108
58 Manhattan East Village 40f1d480f964a520680a1fe3 Hearth 582 8.7 208
59 Manhattan East Village 4575b847f964a520a13e1fe3 Lavagna 143 8.6 76
60 Manhattan Lower East Side 56cf3493cd106ae44d0c76a8 Speedy Romeo LES 302 8.8 81
61 Manhattan Lower East Side 4d49d00ef53c8cfa78561c47 Gaia Italian Cafe 266 9.1 132
62 Manhattan Lower East Side 42893400f964a5206c231fe3 Il Posto Accanto 118 8.8 50
63 Manhattan Lower East Side 3fd66200f964a5209de41ee3 Supper 776 8.6 281
64 Manhattan Lower East Side 4575b847f964a520a13e1fe3 Lavagna 143 8.6 76
65 Manhattan Lower East Side 5070d27ae4b0513ffd4ddfe7 Trapizzino 81 8.5 17
66 Manhattan Tribeca 4a149749f964a52055781fe3 Locanda Verde 1438 8.8 502
67 Manhattan Tribeca 4ad68c35f964a520c20721e3 Pepolino 164 8.8 114
68 Manhattan Tribeca 437bc800f964a520a52a1fe3 Scalini Fedeli 61 8.6 28
69 Manhattan Tribeca 54ab15df498ee7d7723bca15 Adoro Lei 107 8.3 20
70 Manhattan Little Italy 4c7d4f1b8da18cfa1afc9ece Osteria Morini 747 8.7 292
71 Manhattan Little Italy 4cc6222106c25481d7a4a047 Rubirosa Ristorante 2491 9.2 825
72 Manhattan Little Italy 49e4f405f964a52078631fe3 Emporio 510 8.9 217
73 Manhattan Little Italy 4d9f8d97a428a1cdd92acb04 Parm 1129 8.8 494
74 Manhattan Soho 56d92e05498e6c54b6325b19 San Carlo Osteria Piemonte 104 9.1 41
75 Manhattan Soho 4cc6222106c25481d7a4a047 Rubirosa Ristorante 2491 9.2 825
76 Manhattan Soho 4ad68c35f964a520c20721e3 Pepolino 164 8.8 114
77 Manhattan Soho 5ab53749446ea6289e41b0e6 Coco Pazzo Kitchen & Restaurant 57 8.9 11
78 Manhattan Soho 4d9f8d97a428a1cdd92acb04 Parm 1129 8.8 494
79 Manhattan Soho 49e4f405f964a52078631fe3 Emporio 510 8.9 217
80 Manhattan Soho 504b2a9ee4b006c435a465d3 Carbone 704 9.2 233
81 Manhattan West Village 4a27289cf964a52062911fe3 L'Artusi 1168 9.3 368
82 Manhattan West Village 49bd2326f964a5204d541fe3 I Sodi 253 9.0 95
83 Manhattan West Village 5c27b46a67a9fe002ce6b3ca Fiaschetteria Pistoia 33 8.7 10
84 Manhattan West Village 543c7c63498e0a3393da47a2 Via Carota 607 9.2 155
85 Manhattan West Village 4a552b26f964a520c4b31fe3 Malatesta Trattoria 440 8.7 199
86 Manhattan West Village 449e952ef964a520bc341fe3 Sant Ambroeus West Village 217 8.6 71
87 Manhattan West Village 4d327cc72e56236a18991db4 Malaparte 270 8.9 78
88 Manhattan West Village 534c7a27498efe3d035cbbe9 Baker & Co. 399 8.8 98
89 Manhattan West Village 3fd66200f964a5202de71ee3 Palma 483 8.9 127
90 Manhattan West Village 4eb5e354b8f786e2756cb884 The Meatball Shop 1072 9.0 277
91 Manhattan Manhattan Valley 5962a53dc824ae6362e9e625 Osteria 106 38 8.4 9
92 Manhattan Manhattan Valley 5c5b43f18194fc002c18f606 Fumo 13 8.6 5
93 Manhattan Morningside Heights 5c5b43f18194fc002c18f606 Fumo 13 8.6 5
94 Manhattan Morningside Heights 457f1183f964a5204b3f1fe3 Pisticci Ristorante 403 9.1 146
95 Manhattan Morningside Heights 4d573d8aa747b60cc83b332b Lido Harlem 339 8.6 134
96 Manhattan Morningside Heights 3fd66200f964a52006e91ee3 Max SoHa 112 7.8 60
97 Manhattan Morningside Heights 4c956003f7cfa1cd2e2ebd15 Bettolona 91 8.0 40
98 Manhattan Gramercy 4afb2990f964a520a91b22e3 Maialino 1453 8.8 464
99 Manhattan Gramercy 4b741ab4f964a5202cc82de3 Novità Cucina Creativa 110 8.7 38
100 Manhattan Gramercy 57c772d1498e6cb2f6531cdf Follia 110 8.4 20
101 Manhattan Gramercy 5cc3adaa838e59002cb4629d Rezdôra 70 8.4 19
102 Manhattan Battery Park City 556cb8c6498e751e51fbcf41 Parm 246 8.0 73
103 Manhattan Battery Park City 4b4f88adf964a5204c0a27e3 Gigino at Wagner Park 119 8.5 61
104 Manhattan Financial District 4bb54fe02f70c9b6c6188430 Giardino D'oro 35 8.2 18
105 Manhattan Financial District 4a4560a7f964a5201aa81fe3 Harry's Italian Pizza Bar 317 7.8 141
106 Manhattan Carnegie Hill 4aad53a2f964a520b75f20e3 Lex Restaurant 17 8.5 11
107 Manhattan Carnegie Hill 4bb4d86886a8d13a83f8de7f Sfoglia 90 8.1 54
108 Manhattan Carnegie Hill 4b981d9af964a520802d35e3 Elio's 120 9.1 49
109 Manhattan Noho 3fd66200f964a520d0e41ee3 Lil' Frankie's 892 8.8 258
110 Manhattan Noho 4d49d00ef53c8cfa78561c47 Gaia Italian Cafe 266 9.1 132
111 Manhattan Noho 42893400f964a5206c231fe3 Il Posto Accanto 118 8.8 50
112 Manhattan Noho 3fd66200f964a5204de41ee3 Frank Restaurant 422 8.9 162
113 Manhattan Noho 3fd66200f964a5201ce61ee3 Il Buco 540 8.9 146
114 Manhattan Noho 56cf3493cd106ae44d0c76a8 Speedy Romeo LES 302 8.8 81
115 Manhattan Civic Center 437bc800f964a520a52a1fe3 Scalini Fedeli 61 8.6 28
116 Manhattan Civic Center 4ad68c35f964a520c20721e3 Pepolino 164 8.8 114
117 Manhattan Civic Center 4a149749f964a52055781fe3 Locanda Verde 1438 8.8 502
118 Manhattan Midtown South 55e63b89498e3ed62f75cff3 L'Amico 390 8.4 77
119 Manhattan Midtown South 55a03533498ec7e74011d0af La Pecora Bianca 432 8.5 77
120 Manhattan Sutton Place 4b566000f964a520c00d28e3 Felidia 184 8.8 50
121 Manhattan Sutton Place 4af610e2f964a520bf0022e3 Scalinatella 104 8.6 32
122 Manhattan Sutton Place 54b1c94a498e09d5326f68fe amata 30 8.6 9
123 Manhattan Sutton Place 4a8f1d7ef964a520041420e3 Isle of Capri 45 8.2 30
124 Manhattan Sutton Place 4f90a618e4b0ead1972c3da6 Tony's Di Napoli 251 8.3 64
125 Manhattan Turtle Bay 59dfff99419a9e7fcc5b5fa2 La Pecora Bianca 94 8.2 15
126 Manhattan Turtle Bay 5b1db44d0d8a0f002c17fd87 Angeletto 9 7.7 1
127 Manhattan Turtle Bay 4b2042fff964a5208f2f24e3 Pietro's 40 8.1 19
128 Manhattan Tudor City 4b2042fff964a5208f2f24e3 Pietro's 40 8.1 19
129 Manhattan Stuyvesant Town 589a66b251666a5ffadde9ea Fiaschetteria Pistoia 81 8.4 20
130 Manhattan Stuyvesant Town 40f1d480f964a520680a1fe3 Hearth 582 8.7 208
131 Manhattan Stuyvesant Town 49c6a988f964a5206e571fe3 Gnocco 199 8.1 93
132 Manhattan Flatiron 4b741ab4f964a5202cc82de3 Novità Cucina Creativa 110 8.7 38
133 Manhattan Flatiron 4a8c84daf964a520530e20e3 da Umberto 88 9.0 38
134 Manhattan Flatiron 4afb2990f964a520a91b22e3 Maialino 1453 8.8 464
135 Manhattan Hudson Yards 4dcae1b18877502200c95822 Sergimmo Salumeria 328 8.8 129
136 Manhattan Hudson Yards 5633bec0498e430fc8ba8f3c La Vela Dining & Bar 23 8.2 6
137 Manhattan Hudson Yards 4d0122e21ebe6dcb3d918b91 Casa Nonna 201 8.0 79
In [90]:
italian_rest_stats_Queens.shape
Out[90]:
(106, 7)
In [91]:
italian_rest_stats_Queens
Out[91]:
Borough Neighborhood ID Name Likes Rating Tips
0 Queens Astoria 5010b169e4b05edd9983ec7d Antika Restaurant & Pizzeria 72 8.2 31
1 Queens Astoria 4ebf0e380aaf6450ba608920 Via Trenta 57 7.7 28
2 Queens Astoria 53a60a88498ef405d8a78217 VITE vinosteria 106 8.8 30
3 Queens Woodside 4bc11e07920eb713d6491a2c Donato's Restaurant 23 7.2 9
4 Queens Jackson Heights 4a82d6adf964a5206ff91fe3 Uncle Peter's 42 8.9 11
5 Queens Howard Beach 4bae3bd0f964a52009963be3 Brothers Ravioli 10 8.2 2
6 Queens Howard Beach 4bafdb5df964a52086263ce3 Prima Pasta & Cafe 35 7.5 17
7 Queens Howard Beach 4e6409451495676d566f10b5 Bruno Ristorante Italianio 29 8.7 7
8 Queens Howard Beach 4ba148f5f964a5201da937e3 Roma View Catering 16 7.0 3
9 Queens Corona 4b808501f964a5207b7930e3 Park Side 187 8.7 78
10 Queens Corona 4ea2fc90cc2102b34d3d8dc7 Il Triangolo Ristorante 35 8.8 26
11 Queens Corona 0 0 0 0.0 0
12 Queens Forest Hills 4c8d2ce6f87e224bfb6d3b05 Tuscan Hills 46 8.0 15
13 Queens Forest Hills 4ba0203af964a520105c37e3 Portofino Ristorante 58 7.6 38
14 Queens Kew Gardens 4c93eb6a72dd224be41d9591 Paul Michael Brick Oven Cafe 16 7.1 14
15 Queens Richmond Hill 4c93eb6a72dd224be41d9591 Paul Michael Brick Oven Cafe 16 7.1 14
16 Queens Long Island City 5aa41faf178a2a08410ce198 Beebe’s 53 8.5 11
17 Queens Long Island City 53ed8f36498ea1eca81563c1 Il Falco 38 8.1 15
18 Queens Sunnyside 555d29f7498eb6112f44ecac SoleLuna 119 9.1 26
19 Queens Sunnyside 4ce1741194c3b60c5dc776ea Dazie's Restaurant 8 6.0 8
20 Queens East Elmhurst 5480b6d4498e6e352f7a8d3e Cotto 29 5.9 9
21 Queens Maspeth 5c6183b006fb60002ca6572b Patrizia's of Maspeth 6 7.4 2
22 Queens Maspeth 513d152ee4b0d54ade774b14 Forno Pizzeria & Trattoria 20 7.4 12
23 Queens Ridgewood 4b89b361f964a520074c32e3 Joe's Restaurant 33 8.0 15
24 Queens Ridgewood 4c1e7c9e63750f47d5d3b967 Antica Trattoria 19 8.0 14
25 Queens Ridgewood 4dcf12c8fa7664b7c6b91801 Trattoria Cerbone 4 7.0 6
26 Queens Glendale 0 0 0 0.0 0
27 Queens Rego Park 4c50f9ae9d642d7f357fc6dc Avellino Ristorante & Pizzeria 28 8.5 13
28 Queens Ozone Park 4cb21cebdb32f04db2a7cd4d Aldo's Pizzeria & Restaurant 22 7.2 12
29 Queens South Ozone Park 4ac7e812f964a5207fba20e3 Don Peppe 103 8.1 48
30 Queens Whitestone 4ebc34954690a29fd6be2e82 Nonna's Pizzeria and Trattoria 8 7.1 4
31 Queens Whitestone 4ba3d448f964a5200c6438e3 Il Nocello Ristorante 7 7.0 5
32 Queens Whitestone 56071182498e48b25409f3b5 Liola Ristorante 6 6.9 4
33 Queens Whitestone 4bc1f7b6461576b025907c32 Verdi's of Whitestone 12 5.8 4
34 Queens Whitestone 4d290280342d6dcb91a7feca Villagio Ristorante 10 5.8 4
35 Queens Bayside 4bb7ca5b1261d13a83e2e798 Papazzio Restaurant 22 7.9 13
36 Queens Bayside 4d4e0113869cf04dd10ce4ae Trattoria Thirty Five 33 7.1 29
37 Queens Bayside 4b89d531f964a520f54f32e3 Jimmy's Trattoria 11 7.1 7
38 Queens Auburndale 4b96ab2af964a520bfdc34e3 Durso's Pasta & Ravioli Company 27 8.1 15
39 Queens Auburndale 4c0aeaa1340720a1fd5b8793 Primo Amore 6 5.9 2
40 Queens Auburndale 0 0 0 0.0 0
41 Queens Little Neck 4bc8f64c0687ef3bda0bd9cc Aunt Bella's 9 7.9 3
42 Queens Little Neck 4bae85bef964a52073bc3be3 Il Bacco 63 7.6 20
43 Queens Little Neck 528ffa0b11d2ea463d2cd25c Ponte Mollo 9 8.0 3
44 Queens Little Neck 4bc0cad874a9a59398afd0f6 Il Sapore Pizza 6 7.3 4
45 Queens Little Neck 4c1a9ed0b4e62d7fa119d893 La Grotta di Marcello 7 6.6 3
46 Queens Little Neck 4bd23c50caff95215f71d2f0 Il Toscano 18 6.2 12
47 Queens Douglaston 4bc8f64c0687ef3bda0bd9cc Aunt Bella's 9 7.9 3
48 Queens Douglaston 4bc0cad874a9a59398afd0f6 Il Sapore Pizza 6 7.3 4
49 Queens Douglaston 4bae85bef964a52073bc3be3 Il Bacco 63 7.6 20
50 Queens Douglaston 4c1a9ed0b4e62d7fa119d893 La Grotta di Marcello 7 6.6 3
51 Queens Douglaston 4bd23c50caff95215f71d2f0 Il Toscano 18 6.2 12
52 Queens Glen Oaks 4c450fae74ffc928328676cc Luigi's Restaurant & Bar 79 8.4 34
53 Queens Bellerose 4cf009ae7b94370446c43653 Trattoria Lucia 17 6.5 8
54 Queens Bellerose 4d0ab4386aa05481d5f5e5aa Arturo's Ristorante Italiano 6 5.9 1
55 Queens Oakland Gardens 4c1e3a9f8b3aa593b4b49b5f L'italiana Trattoria 7 7.5 14
56 Queens Oakland Gardens 4b9c519ef964a520065f36e3 Villa Rustica Ristorante & Pizza 13 7.4 13
57 Queens Steinway 5c087e308264440039684a37 Ninos Aq 9 8.2 5
58 Queens Steinway 4afc64a8f964a520382222e3 Trattoria L'incontro 123 8.8 61
59 Queens Steinway 4b494398f964a520d96b26e3 Porto Bello Pizza and Restaurant 59 8.2 21
60 Queens Steinway 53a618d4498ea7107dabe020 Via Vai 32 8.2 10
61 Queens Steinway 4b26d60cf964a520b58124e3 Ornella Trattoria Italiana 42 7.9 72
62 Queens Beechhurst 4e22342252b1f82ffba73c1c due ponti ristorante 7 6.8 9
63 Queens Beechhurst 4ce9b1fcfe90a35d7bf2490e The Clinton Restaurant 16 7.0 6
64 Queens Beechhurst 4ba3d448f964a5200c6438e3 Il Nocello Ristorante 7 7.0 5
65 Queens Beechhurst 4d290280342d6dcb91a7feca Villagio Ristorante 10 5.8 4
66 Queens Beechhurst 0 0 0 0.0 0
67 Queens Bay Terrace 0 0 0 0.0 0
68 Queens Neponsit 4bd0c0cecaff9521b878cff0 Plum Tomatoes 5 6.2 16
69 Queens Floral Park 4c450fae74ffc928328676cc Luigi's Restaurant & Bar 79 8.4 34
70 Queens Hillcrest 4b368ed8f964a520f53725e3 Acquista Trattoria 34 8.0 28
71 Queens Ravenswood 5b53e651005ac10039e41a58 Botte Bar 9 7.9 11
72 Queens Ravenswood 53a60a88498ef405d8a78217 VITE vinosteria 106 8.8 30
73 Queens Ravenswood 5aa41faf178a2a08410ce198 Beebe’s 53 8.5 11
74 Queens Ravenswood 49c68eaaf964a5205c571fe3 Vesta Trattoria & Wine Bar 185 9.0 106
75 Queens Ravenswood 4a86124ff964a5204e0020e3 Napoli Pizza & Pasta 48 7.7 34
76 Queens Lindenwood 4e6409451495676d566f10b5 Bruno Ristorante Italianio 29 8.7 7
77 Queens Lindenwood 4e4e429ebd4101d0d7a63105 Matteo's 29 6.8 10
78 Queens Lefrak City 4c50f9ae9d642d7f357fc6dc Avellino Ristorante & Pizzeria 28 8.5 13
79 Queens Lefrak City 4ea2fc90cc2102b34d3d8dc7 Il Triangolo Ristorante 35 8.8 26
80 Queens Belle Harbor 4bd0c0cecaff9521b878cff0 Plum Tomatoes 5 6.2 16
81 Queens Rockaway Park 4bd0c0cecaff9521b878cff0 Plum Tomatoes 5 6.2 16
82 Queens Bellaire 4bdcdd7c462b2d7fd0b7113c Cara Mia Restaurant 29 8.6 11
83 Queens Bellaire 0 0 0 0.0 0
84 Queens Forest Hills Gardens 4c8d2ce6f87e224bfb6d3b05 Tuscan Hills 46 8.0 15
85 Queens Forest Hills Gardens 4ba0203af964a520105c37e3 Portofino Ristorante 58 7.6 38
86 Queens Utopia 4b368ed8f964a520f53725e3 Acquista Trattoria 34 8.0 28
87 Queens Pomonok 4bbb76328a0d95216761d930 Francesco's Pizzeria & Restaurant 6 5.8 4
88 Queens Astoria Heights 4b494398f964a520d96b26e3 Porto Bello Pizza and Restaurant 59 8.2 21
89 Queens Astoria Heights 4f048814f9ab88b0c268dda3 Antonio's Kitchen 15 6.9 12
90 Queens Astoria Heights 4af4e590f964a52049f721e3 Forno Siciliano 12 7.0 11
91 Queens Hunters Point 463220f3f964a520fb451fe3 Manetta's Ristorante 74 8.5 35
92 Queens Hunters Point 4a1a3f6df964a5208b7a1fe3 Bella Via 64 8.1 36
93 Queens Hunters Point 49f5bf5ef964a520b46b1fe3 Manducatis Rustica 70 8.3 38
94 Queens Hunters Point 556fb3b4498e61f524e70951 Maiella 92 8.8 28
95 Queens Hunters Point 4f74ff83e4b09b101271b89b Manducatis 33 7.8 9
96 Queens Hunters Point 540a3547498e9b339b6431ae Le Fanfare 112 8.2 33
97 Queens Hunters Point 53ed8f36498ea1eca81563c1 Il Falco 38 8.1 15
98 Queens Sunnyside Gardens 555d29f7498eb6112f44ecac SoleLuna 119 9.1 26
99 Queens Sunnyside Gardens 4bc11e07920eb713d6491a2c Donato's Restaurant 23 7.2 9
100 Queens Sunnyside Gardens 4c0d4e92b1b676b07c63e086 Rocco's Italian Sauage / Cheese Steaks / Break... 21 7.3 15
101 Queens Middle Village 53989edf498e85ce86d65ea2 Villa Erasmo 16 8.2 4
102 Queens Malba 56071182498e48b25409f3b5 Liola Ristorante 6 6.9 4
103 Queens Queensbridge 5aa41faf178a2a08410ce198 Beebe’s 53 8.5 11
104 Queens Queensbridge 53ed8f36498ea1eca81563c1 Il Falco 38 8.1 15
105 Queens Queensbridge 57a13096498e42182b7df641 Oro Restaurant and Lounge 8 6.5 4
In [92]:
italian_rest_stats_Staten_Island.shape
Out[92]:
(104, 7)
In [93]:
italian_rest_stats_Staten_Island
Out[93]:
Borough Neighborhood ID Name Likes Rating Tips
0 Staten Island St. George 0 0 0 0 0
1 Staten Island St. George 4a271f0cf964a5205c911fe3 Enoteca Maria 92 7.6 40
2 Staten Island St. George 4b76d8dbf964a520be632ee3 Pier 76 Italian Restaurant 79 7.9 44
3 Staten Island New Brighton 590928301de7651d663ae087 Marie's 2 9 8.1 2
4 Staten Island New Brighton 4b76d8dbf964a520be632ee3 Pier 76 Italian Restaurant 79 7.9 44
5 Staten Island New Brighton 4a271f0cf964a5205c911fe3 Enoteca Maria 92 7.6 40
6 Staten Island Rosebank 4bcc8e3bb6c49c7422ed9391 Tony's Brick Oven Pizzeria 18 8.3 18
7 Staten Island Rosebank 4e179bdc52b123a586ceea11 Bin 5 19 8.2 7
8 Staten Island Rosebank 4bbb8986e452952190d154a4 Da Noi Fingerboard 20 7.4 6
9 Staten Island Rosebank 0 0 0 0 0
10 Staten Island West Brighton 4b5b58dbf964a52088f628e3 Panini Grill 22 8.4 1136
11 Staten Island West Brighton 4bf872974a67c928b57725cf Cafe Milano 19 8 6
12 Staten Island West Brighton 4b6b0b96f964a52001ef2be3 Pastosa's 13 7.7 6
13 Staten Island Mariner's Harbor 4d51deac3062a1cd37786ba3 Bella Mama Rose Italian Restaurant 6 6.6 10
14 Staten Island Castleton Corners 4b9a599af964a5201aae35e3 Cucina Mia 5 7.1 3
15 Staten Island Castleton Corners 4e35b9daaeb7f67fbd346ef9 Waterfalls 7 5.9 25
16 Staten Island Travis 4ad910d8f964a520b81721e3 Da Noi Restaraunt 13 7.9 6
17 Staten Island New Dorp 4b343839f964a5203a2625e3 La Strada 24 8.4 10
18 Staten Island New Dorp 4be61580d4f7c9b6fe662620 Brioso 22 7.6 15
19 Staten Island New Dorp 4bc73ff96501c9b696063e29 Little Italy Gourmet 12 7.5 6
20 Staten Island New Dorp 4b9fb541f964a520fd3637e3 La Fontana Restaurant 16 6.9 8
21 Staten Island New Dorp 0 0 0 0 0
22 Staten Island Great Kills 517dbe77e4b0eef580c875a3 Piccolino's italian Restaurant 13 7.9 2
23 Staten Island Great Kills 5182ef83498e59069ff5e71b Patrizia's Pizza and Pasta 59 8 190
24 Staten Island Great Kills 4d4b4295ad4a6ea89135fbe9 Fiore Di Mare 6 8.5 5
25 Staten Island Great Kills 4cb8efaa90c9a143a5e183d6 Benvenuti Pizzeria e Trattoria 3 5.8 9
26 Staten Island Great Kills 0 0 0 0 0
27 Staten Island Great Kills 0 0 0 0 0
28 Staten Island Eltingville 4c4a44f9bad7a593ee641daa Giovannis Trattoria 10 7.4 4
29 Staten Island Eltingville 5182ef83498e59069ff5e71b Patrizia's Pizza and Pasta 59 8 190
30 Staten Island Eltingville 0 0 0 0 0
31 Staten Island Woodrow 0 0 0 0 0
32 Staten Island Tottenville 4bf08bf117880f47a3782937 Angelina's Ristorante 37 8.3 23
33 Staten Island Tottenville 59fc9f85f193c02897fc2369 Deluca’s Italian Restaurant 8 7.6 2
34 Staten Island Tottenville 537e9b77498e6816a1f38ca6 Dinico of mulberry 5 6.3 1
35 Staten Island Tompkinsville 4b76d8dbf964a520be632ee3 Pier 76 Italian Restaurant 79 7.9 44
36 Staten Island Tompkinsville 590928301de7651d663ae087 Marie's 2 9 8.1 2
37 Staten Island Tompkinsville 4a271f0cf964a5205c911fe3 Enoteca Maria 92 7.6 40
38 Staten Island Westerleigh 4b8a719df964a520016d32e3 Jimmy Max 49 8.1 15
39 Staten Island Arrochar 4bddbdea587b2d7fc5e25409 Basilio's Inn 17 7.3 4
40 Staten Island Arrochar 4c2546d5a852c928e5a2e46c Italianissimo 14 7 7
41 Staten Island Grasmere 4b803abff964a520cd5e30e3 Nino's 21 8.2 9
42 Staten Island Grasmere 4be73347d4f7c9b66c992720 Bocelli 35 7.6 13
43 Staten Island Grasmere 4b9bdbd8f964a5201e2e36e3 Cafe Luna 14 7.2 7
44 Staten Island Grasmere 0 0 0 0 0
45 Staten Island Old Town 4bcf46d4a8b3a593fae6615f Pastosa Ravioli 32 9.1 8
46 Staten Island Old Town 4be73347d4f7c9b66c992720 Bocelli 35 7.6 13
47 Staten Island Old Town 4303cf80f964a5201c271fe3 Trattoria Romana 60 7.7 17
48 Staten Island Old Town 4b803abff964a520cd5e30e3 Nino's 21 8.2 9
49 Staten Island Old Town 4b9bdbd8f964a5201e2e36e3 Cafe Luna 14 7.2 7
50 Staten Island Old Town 4daa28bd93a04642f079c973 Cielo Ristorante 12 7 3
51 Staten Island Old Town 4af72d60f964a520ce0622e3 Pasticceria Bruno 39 7.5 23
52 Staten Island Dongan Hills 4ba80534f964a520f6c639e3 Max's Es-Ca 27 8.8 174
53 Staten Island Dongan Hills 54e13989498ed2a42c122b0f Mario's 17 7.9 9
54 Staten Island Dongan Hills 4af72d60f964a520ce0622e3 Pasticceria Bruno 39 7.5 23
55 Staten Island Dongan Hills 4303cf80f964a5201c271fe3 Trattoria Romana 60 7.7 17
56 Staten Island Dongan Hills 53e3fedd498ed822e0283349 Michael's Meatballs & Martinis 22 7.1 8
57 Staten Island Dongan Hills 4daa28bd93a04642f079c973 Cielo Ristorante 12 7 3
58 Staten Island Dongan Hills 0 0 0 0 0
59 Staten Island Grant City 4d7acef35462b60c7c97cbd8 Cucina Fresca 5 8 5
60 Staten Island Grant City 4b343839f964a5203a2625e3 La Strada 24 8.4 10
61 Staten Island Grant City 4be61580d4f7c9b6fe662620 Brioso 22 7.6 15
62 Staten Island Grant City 4bc73ff96501c9b696063e29 Little Italy Gourmet 12 7.5 6
63 Staten Island New Dorp Beach 0 0 0 0 0
64 Staten Island Bay Terrace 517dbe77e4b0eef580c875a3 Piccolino's italian Restaurant 13 7.9 2
65 Staten Island Bay Terrace 0 0 0 0 0
66 Staten Island Bay Terrace 0 0 0 0 0
67 Staten Island Bay Terrace 4cb8efaa90c9a143a5e183d6 Benvenuti Pizzeria e Trattoria 3 5.8 9
68 Staten Island Bay Terrace 0 0 0 0 0
69 Staten Island Huguenot 0 0 0 0 0
70 Staten Island Charleston 4ba6706af964a520875239e3 Nucci's 29 7.6 7
71 Staten Island Charleston 4f5b584da17c35d95157d1ec Zio Toto - Staten Island 14 7.2 8
72 Staten Island Charleston 0 0 0 0 0
73 Staten Island Charleston 0 0 0 0 0
74 Staten Island Arden Heights 50189ccee4b0d35e6d8774f8 Villa Monte's 11 6.6 5
75 Staten Island Greenridge 4c364d5f93db0f4754d81d92 All Star Cafe 5 7.5 4
76 Staten Island Chelsea 4ad910d8f964a520b81721e3 Da Noi Restaraunt 13 7.9 6
77 Staten Island Bulls Head 0 0 0 0 0
78 Staten Island Bulls Head 4bfaf5c9ab180f477f32b3ce Cafe del Mondo 10 5.5 6
79 Staten Island Richmond Town 5079ccdce4b065f1dd8155ad Casa verde 8 7.8 3
80 Staten Island Richmond Town 0 0 0 0 0
81 Staten Island Richmond Town 4b9fb541f964a520fd3637e3 La Fontana Restaurant 16 6.9 8
82 Staten Island Shore Acres 4e179bdc52b123a586ceea11 Bin 5 19 8.2 7
83 Staten Island Shore Acres 4bcc8e3bb6c49c7422ed9391 Tony's Brick Oven Pizzeria 18 8.3 18
84 Staten Island Shore Acres 4bbb8986e452952190d154a4 Da Noi Fingerboard 20 7.4 6
85 Staten Island Shore Acres 0 0 0 0 0
86 Staten Island Clifton 4bcc8e3bb6c49c7422ed9391 Tony's Brick Oven Pizzeria 18 8.3 18
87 Staten Island Clifton 4e179bdc52b123a586ceea11 Bin 5 19 8.2 7
88 Staten Island Concord 4bcf46d4a8b3a593fae6615f Pastosa Ravioli 32 9.1 8
89 Staten Island Concord 4b803abff964a520cd5e30e3 Nino's 21 8.2 9
90 Staten Island Concord 4be73347d4f7c9b66c992720 Bocelli 35 7.6 13
91 Staten Island Concord 4b9bdbd8f964a5201e2e36e3 Cafe Luna 14 7.2 7
92 Staten Island Emerson Hill 4bcf46d4a8b3a593fae6615f Pastosa Ravioli 32 9.1 8
93 Staten Island Randall Manor 4bf872974a67c928b57725cf Cafe Milano 19 8 6
94 Staten Island Elm Park 4d51deac3062a1cd37786ba3 Bella Mama Rose Italian Restaurant 6 6.6 10
95 Staten Island Willowbrook 4e35b9daaeb7f67fbd346ef9 Waterfalls 7 5.9 25
96 Staten Island Sandy Ground 0 0 0 0 0
97 Staten Island Egbertville 4c27cc8f3492a593cb72b628 Classic Pizza 7 7.7 2
98 Staten Island Prince's Bay 0 0 0 0 0
99 Staten Island Lighthouse Hill 5079ccdce4b065f1dd8155ad Casa verde 8 7.8 3
100 Staten Island Lighthouse Hill 4c27cc8f3492a593cb72b628 Classic Pizza 7 7.7 2
101 Staten Island Richmond Valley 4f5b584da17c35d95157d1ec Zio Toto - Staten Island 14 7.2 8
102 Staten Island Richmond Valley 4ba6706af964a520875239e3 Nucci's 29 7.6 7
103 Staten Island Richmond Valley 0 0 0 0 0
In [94]:
italian_rest_stats_ny.shape
Out[94]:
(548, 7)

Save the Restaurants data in a csv file

In [95]:
italian_rest_stats_ny.to_csv('italian_rest_stats_ny.csv', index=False)
In [96]:
# verify the data in csv
italian_rest_stats_ny_csv=pd.read_csv('italian_rest_stats_ny.csv')
In [97]:
italian_rest_stats_ny_csv.shape
Out[97]:
(548, 7)
In [98]:
italian_rest_stats_ny_csv.head()
Out[98]:
Borough Neighborhood ID Name Likes Rating Tips
0 Bronx Riverdale 55aaee4d498e3cbb70e625d6 Bella Notte Pizzeria 9 7.1 4
1 Bronx Kingsbridge 55aaee4d498e3cbb70e625d6 Bella Notte Pizzeria 9 7.1 4
2 Bronx Woodlawn 511edb6de4b0d58346fd272d Patrizia's Of Woodlawn 18 8.4 14
3 Bronx Woodlawn 4d3cb3026b3d236a066a6364 Rivers Edge 10 6.7 8
4 Bronx Baychester 4c9518076b35a143d5dc21dc Fratelli's 22 8.6 6
In [99]:
italian_rest_stats_ny.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 548 entries, 0 to 547
Data columns (total 7 columns):
 #   Column        Non-Null Count  Dtype 
---  ------        --------------  ----- 
 0   Borough       548 non-null    object
 1   Neighborhood  548 non-null    object
 2   ID            548 non-null    object
 3   Name          548 non-null    object
 4   Likes         548 non-null    object
 5   Rating        548 non-null    object
 6   Tips          548 non-null    object
dtypes: object(7)
memory usage: 30.1+ KB

Convert the data type of Likes and Tips to Float

In [100]:
# convert likes to float
italian_rest_stats_ny['Likes']=italian_rest_stats_ny['Likes'].astype('float64')
In [101]:
# convert Tips to float
italian_rest_stats_ny['Tips']=italian_rest_stats_ny['Tips'].astype('float64')
In [109]:
# convert Rating to float
italian_rest_stats_ny['Rating']=italian_rest_stats_ny['Rating'].astype('float64')
In [110]:
italian_rest_stats_ny.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 548 entries, 0 to 547
Data columns (total 7 columns):
 #   Column        Non-Null Count  Dtype  
---  ------        --------------  -----  
 0   Borough       548 non-null    object 
 1   Neighborhood  548 non-null    object 
 2   ID            548 non-null    object 
 3   Name          548 non-null    object 
 4   Likes         548 non-null    float64
 5   Rating        548 non-null    float64
 6   Tips          548 non-null    float64
dtypes: float64(3), object(4)
memory usage: 30.1+ KB

Restaurant with maximum Likes

In [111]:
italian_rest_stats_ny.iloc[italian_rest_stats_ny['Likes'].idxmax()]
Out[111]:
Borough                        Manhattan
Neighborhood           Greenwich Village
ID              4cc6222106c25481d7a4a047
Name                 Rubirosa Ristorante
Likes                               2491
Rating                               9.2
Tips                                 825
Name: 254, dtype: object

Restaurant with maximum Rating

In [112]:
italian_rest_stats_ny.iloc[italian_rest_stats_ny['Rating'].idxmax()]
Out[112]:
Borough                         Brooklyn
Neighborhood                    Bushwick
ID              5a98aed16a59506d7a60d67c
Name                          Carmenta’s
Likes                                 58
Rating                               9.4
Tips                                  21
Name: 112, dtype: object

Restaurant with maximum Tips

In [113]:
italian_rest_stats_ny.iloc[italian_rest_stats_ny['Tips'].idxmax()]
Out[113]:
Borough                    Staten Island
Neighborhood               West Brighton
ID              4b5b58dbf964a52088f628e3
Name                        Panini Grill
Likes                                 22
Rating                               8.4
Tips                                1136
Name: 454, dtype: object

Top 10 NYC neighborhoods with highly rated Italian Restaurants

In [115]:
ny_neighborhood_stats=italian_rest_stats_ny.groupby('Neighborhood',as_index=False).mean()[['Neighborhood','Rating']]
ny_neighborhood_stats.columns=['Neighborhood','Average Rating']
In [116]:
ny_neighborhood_stats.sort_values(['Average Rating'],ascending=False).head(10)
Out[116]:
Neighborhood Average Rating
45 Downtown 9.100000
19 Boerum Hill 9.100000
56 Emerson Hill 9.100000
23 Bushwick 9.050000
77 Greenpoint 9.000000
27 Central Harlem 9.000000
151 Soho 8.985714
79 Greenwich Village 8.981818
176 West Village 8.910000
87 Jackson Heights 8.900000

Average Rating of Italian Restaurants in the 5 NYC Boroughs

In [117]:
ny_borough_stats=italian_rest_stats_ny.groupby('Borough',as_index=False).mean()[['Borough','Rating']]
ny_borough_stats.columns=['Borough','Average Rating']
In [118]:
ny_borough_stats.sort_values(['Average Rating'],ascending=False)
Out[118]:
Borough Average Rating
2 Manhattan 8.614493
1 Brooklyn 7.774561
0 Bronx 7.460465
3 Queens 7.166038
4 Staten Island 6.003846

Plot the Average rating of Italian Restaurants by Borough

In [119]:
plt.figure(figsize=(9,5), dpi = 100)
# title
plt.title('Average rating of Italian Restaurants for each Borough')
#On x-axis
plt.xlabel('Borough', fontsize = 15)
#On y-axis
plt.ylabel('Average Rating', fontsize=15)
#giving a bar plot
italian_rest_stats_ny.groupby('Borough').mean()['Rating'].plot(kind='bar')
#legend
plt.legend()
#displays the plot
plt.show()

Get the list of NYC neighborhoods with an Average rating of 8.5 or higher

In [120]:
ny_neighborhood_stats=ny_neighborhood_stats[ny_neighborhood_stats['Average Rating']>=8.5]
In [121]:
ny_neighborhood_stats
Out[121]:
Neighborhood Average Rating
19 Boerum Hill 9.100000
21 Brooklyn Heights 8.725000
23 Bushwick 9.050000
24 Carnegie Hill 8.566667
27 Central Harlem 9.000000
31 Civic Center 8.733333
34 Clinton Hill 8.750000
35 Cobble Hill 8.533333
45 Downtown 9.100000
46 Dumbo 8.500000
50 East Village 8.650000
51 East Williamsburg 8.666667
56 Emerson Hill 9.100000
59 Flatiron 8.833333
64 Fort Greene 8.900000
66 Fulton Ferry 8.500000
72 Gramercy 8.575000
77 Greenpoint 9.000000
79 Greenwich Village 8.981818
80 Hamilton Heights 8.850000
87 Jackson Heights 8.900000
90 Lefrak City 8.650000
91 Lenox Hill 8.516667
95 Little Italy 8.900000
98 Lower East Side 8.733333
102 Manhattan Valley 8.500000
119 Noho 8.883333
121 North Side 8.850000
126 Park Slope 8.900000
128 Pelham Gardens 8.600000
137 Rego Park 8.500000
151 Soho 8.985714
161 Sutton Place 8.500000
166 Tribeca 8.625000
169 Upper East Side 8.600000
173 Vinegar Hill 8.500000
174 Washington Heights 8.700000
176 West Village 8.910000
186 Yorkville 8.650000
In [122]:
ny_neighborhood_stats.shape
Out[122]:
(39, 2)

Total of 39 Italian Restaurants with an average rating of 8.5 or higher

In [123]:
ny_neighborhood_stats=pd.merge(ny_neighborhood_stats,new_york_data, on='Neighborhood')

Merge the Neighborhoods geospatial data with the ratings data

In [124]:
ny_neighborhood_stats
Out[124]:
Neighborhood Average Rating Borough Latitude Longitude
0 Boerum Hill 9.100000 Brooklyn 40.685683 -73.983748
1 Brooklyn Heights 8.725000 Brooklyn 40.695864 -73.993782
2 Bushwick 9.050000 Brooklyn 40.698116 -73.925258
3 Carnegie Hill 8.566667 Manhattan 40.782683 -73.953256
4 Central Harlem 9.000000 Manhattan 40.815976 -73.943211
5 Civic Center 8.733333 Manhattan 40.715229 -74.005415
6 Clinton Hill 8.750000 Brooklyn 40.693229 -73.967843
7 Cobble Hill 8.533333 Brooklyn 40.687920 -73.998561
8 Downtown 9.100000 Brooklyn 40.690844 -73.983463
9 Dumbo 8.500000 Brooklyn 40.703176 -73.988753
10 East Village 8.650000 Manhattan 40.727847 -73.982226
11 East Williamsburg 8.666667 Brooklyn 40.708492 -73.938858
12 Emerson Hill 9.100000 Staten Island 40.606794 -74.097762
13 Flatiron 8.833333 Manhattan 40.739673 -73.990947
14 Fort Greene 8.900000 Brooklyn 40.688527 -73.972906
15 Fulton Ferry 8.500000 Brooklyn 40.703281 -73.995508
16 Gramercy 8.575000 Manhattan 40.737210 -73.981376
17 Greenpoint 9.000000 Brooklyn 40.730201 -73.954241
18 Greenwich Village 8.981818 Manhattan 40.726933 -73.999914
19 Hamilton Heights 8.850000 Manhattan 40.823604 -73.949688
20 Jackson Heights 8.900000 Queens 40.751981 -73.882821
21 Lefrak City 8.650000 Queens 40.736075 -73.862525
22 Lenox Hill 8.516667 Manhattan 40.768113 -73.958860
23 Little Italy 8.900000 Manhattan 40.719324 -73.997305
24 Lower East Side 8.733333 Manhattan 40.717807 -73.980890
25 Manhattan Valley 8.500000 Manhattan 40.797307 -73.964286
26 Noho 8.883333 Manhattan 40.723259 -73.988434
27 North Side 8.850000 Brooklyn 40.714823 -73.958809
28 Park Slope 8.900000 Brooklyn 40.672321 -73.977050
29 Pelham Gardens 8.600000 Bronx 40.862966 -73.841612
30 Rego Park 8.500000 Queens 40.728974 -73.857827
31 Soho 8.985714 Manhattan 40.722184 -74.000657
32 Sutton Place 8.500000 Manhattan 40.760280 -73.963556
33 Tribeca 8.625000 Manhattan 40.721522 -74.010683
34 Upper East Side 8.600000 Manhattan 40.775639 -73.960508
35 Vinegar Hill 8.500000 Brooklyn 40.703321 -73.981116
36 Washington Heights 8.700000 Manhattan 40.851903 -73.936900
37 West Village 8.910000 Manhattan 40.734434 -74.006180
38 Yorkville 8.650000 Manhattan 40.775930 -73.947118
In [125]:
ny_neighborhood_stats.shape
Out[125]:
(39, 5)
In [126]:
ny_neighborhood_stats=ny_neighborhood_stats[['Borough','Neighborhood','Latitude','Longitude','Average Rating']]
In [127]:
ny_neighborhood_stats.sort_values(by=['Average Rating'], ascending=False, inplace=True)
ny_neighborhood_stats
Out[127]:
Borough Neighborhood Latitude Longitude Average Rating
0 Brooklyn Boerum Hill 40.685683 -73.983748 9.100000
8 Brooklyn Downtown 40.690844 -73.983463 9.100000
12 Staten Island Emerson Hill 40.606794 -74.097762 9.100000
2 Brooklyn Bushwick 40.698116 -73.925258 9.050000
17 Brooklyn Greenpoint 40.730201 -73.954241 9.000000
4 Manhattan Central Harlem 40.815976 -73.943211 9.000000
31 Manhattan Soho 40.722184 -74.000657 8.985714
18 Manhattan Greenwich Village 40.726933 -73.999914 8.981818
37 Manhattan West Village 40.734434 -74.006180 8.910000
28 Brooklyn Park Slope 40.672321 -73.977050 8.900000
20 Queens Jackson Heights 40.751981 -73.882821 8.900000
14 Brooklyn Fort Greene 40.688527 -73.972906 8.900000
23 Manhattan Little Italy 40.719324 -73.997305 8.900000
26 Manhattan Noho 40.723259 -73.988434 8.883333
27 Brooklyn North Side 40.714823 -73.958809 8.850000
19 Manhattan Hamilton Heights 40.823604 -73.949688 8.850000
13 Manhattan Flatiron 40.739673 -73.990947 8.833333
6 Brooklyn Clinton Hill 40.693229 -73.967843 8.750000
24 Manhattan Lower East Side 40.717807 -73.980890 8.733333
5 Manhattan Civic Center 40.715229 -74.005415 8.733333
1 Brooklyn Brooklyn Heights 40.695864 -73.993782 8.725000
36 Manhattan Washington Heights 40.851903 -73.936900 8.700000
11 Brooklyn East Williamsburg 40.708492 -73.938858 8.666667
38 Manhattan Yorkville 40.775930 -73.947118 8.650000
21 Queens Lefrak City 40.736075 -73.862525 8.650000
10 Manhattan East Village 40.727847 -73.982226 8.650000
33 Manhattan Tribeca 40.721522 -74.010683 8.625000
29 Bronx Pelham Gardens 40.862966 -73.841612 8.600000
34 Manhattan Upper East Side 40.775639 -73.960508 8.600000
16 Manhattan Gramercy 40.737210 -73.981376 8.575000
3 Manhattan Carnegie Hill 40.782683 -73.953256 8.566667
7 Brooklyn Cobble Hill 40.687920 -73.998561 8.533333
22 Manhattan Lenox Hill 40.768113 -73.958860 8.516667
30 Queens Rego Park 40.728974 -73.857827 8.500000
15 Brooklyn Fulton Ferry 40.703281 -73.995508 8.500000
32 Manhattan Sutton Place 40.760280 -73.963556 8.500000
9 Brooklyn Dumbo 40.703176 -73.988753 8.500000
25 Manhattan Manhattan Valley 40.797307 -73.964286 8.500000
35 Brooklyn Vinegar Hill 40.703321 -73.981116 8.500000

Create a map and display the restaurants neighborhoods

In [128]:
ny_map = folium.Map(location=geo_location('New York'), zoom_start=12)
In [129]:
# instantiate a feature group for the restaurants in the dataframe
restaurants = folium.map.FeatureGroup()

# loop through the 100 crimes and add each to the restaurants feature group
for lat, lng, in ny_neighborhood_stats[['Latitude','Longitude']].values:
    restaurants.add_child(
        folium.CircleMarker(
            [lat, lng],
            radius=10, # define how big you want the circle markers to be
            color='red',
            fill=True,
            fill_color='blue',
            fill_opacity=0.6
        )
    )
In [130]:
ny_neighborhood_stats['Label']=ny_neighborhood_stats['Neighborhood']+', '+ny_neighborhood_stats['Borough']+'('+ny_neighborhood_stats['Average Rating'].map(str)+')'
In [131]:
# add pop-up text to each marker on the map
for lat, lng, label in ny_neighborhood_stats[['Latitude','Longitude','Label']].values:
    folium.Marker([lat, lng], popup=label).add_to(ny_map)        
# add restaurnts to map
ny_map.add_child(restaurants)
Out[131]:
Make this Notebook Trusted to load map: File -> Trust Notebook

Visualize the Boroughs based on average Rating using a Choropleth Map

In [132]:
ny_geo = r'Borough Boundaries.geojson'

ny_map.choropleth(
    geo_data=ny_geo,
    data=ny_borough_stats,
    columns=['Borough', 'Average Rating'],
    key_on='feature.properties.boro_name',
    fill_color='YlOrRd', 
    fill_opacity=0.7, 
    line_opacity=0.2,
    legend_name='Average Rating'
)

# display map
# as this is huge map data , we will save it to a file
ny_map.save('borough_rating.html')
ny_map
Out[132]:
Make this Notebook Trusted to load map: File -> Trust Notebook

Conclusion

In [ ]:
Nearly 550 Italian restaurants have been identified, dotted across all 5 Boroughs. Whilst Manhattan boasts the most number of Italian Restaurants (138), 
there's a fairly even spread of restaurants amongst all the Boroughs. 

Borough          No. of Italian Restaurants
Manhattan        138
Brooklyn         114
Queens           106
Staten Island    104
Bronx             86

In terms of Neighborhoods, the following have the most number of Italian Restaurants and can be considered by visitors who prefer Italian cuisine for staying, 
while in NYC 

Neighborhood                 Number of Italian Restaurants
Belmont                      15
Greenwich Village            11
Fordham                      10
West Village                 10
Carroll Gardens               7
Old Town                      7
Upper East Side               7
Dongan Hills                  7
Hunters Point                 7
Soho                          7

Neighborhoods that have the most highly rated (Rating >=9) Italian Restaurants are 

Neighborhood                 Average Rating of Italian Restaurants
Downtown                     9.10
Boerum Hill                  9.10
Emerson Hill                 9.10
Bushwick                     9.05
Central Harlem               9.00
Greenpoint                   9.00

Manhattan has the highest average rating of Italian Restaurants and Staten Island has the least average rating. 

Borough         Average Rating
Manhattan       8.61
Brooklyn        7.77
Bronx           7.46
Queens          7.17
Staten Island   6.00

This indicates that opening up a high quality Italian Restaurant in Staten Island could be a good business proposition. 

Limitations
The ranking of Italian Restaurants is solely based on the users rating in FourSquare
The accuracy of the analysis depends on the data provided by FourSquare
In [ ]: